+ Reply to Thread
Results 1 to 12 of 12

Creating an outlook Task from excel

Hybrid View

jsmity Creating an outlook Task from... 10-19-2011, 06:23 AM
jsmity Re: Creating an outlook Task... 10-19-2011, 02:49 PM
jsmity Re: Creating an outlook Task... 10-21-2011, 03:00 PM
Leith Ross Re: Creating an outlook Task... 10-21-2011, 04:03 PM
jsmity Re: Creating an outlook Task... 10-21-2011, 04:43 PM
jsmity Re: Creating an outlook Task... 10-22-2011, 05:12 PM
jaslake Re: Creating an outlook Task... 10-23-2011, 03:28 PM
jsmity Re: Creating an outlook Task... 10-24-2011, 06:48 AM
jaslake Re: Creating an outlook Task... 10-24-2011, 12:25 PM
  1. #1
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Creating an outlook Task from excel

    hi,

    We use action logs a lot in my company and then i transfer my actions into outlook tasks.

    Is there a way i can do this via the excel based action log. i tried altering the code used for adding an outlook appointment as per this thread i raised some years back.
    http://www.excelforum.com/excel-prog...s-outlook.html

    But it doesnt work.

    I've attached the action log excel sheet. any help appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    can anyone help me out with this ?

  3. #3
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    Hi any help appreciated

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Creating an outlook Task from excel

    Hello jsmity,

    I thought this was familiar. What do you want to go where in the Outlookk Task?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    Issue/area In the task subject
    Action in the notes
    Responsibility is the assigned to person
    Deadline is the due date

    Thanks leith

  6. #6
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    Hi leith can you offer any advice

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Creating an outlook Task from excel

    Hi jsmity
    This code is in the attached and appears to do as you require. Let me know of issues.
    Option Explicit
    Sub Create_Task()
        Dim olApp As Object
        Dim olNs As Object
        Dim Fldr As Object
        Dim olTsk As Object
        Dim LR As Long
        Dim Rng As Range
        Dim Cell As Range
        Application.ScreenUpdating = False
        LR = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
        ActiveSheet.Range("A4:AH" & LR).AutoFilter Field:=2, Criteria1:="="
     
        Set Rng = Range("A5:A" & LR).SpecialCells(xlCellTypeVisible)
        Set olApp = CreateObject("Outlook.Application")
        Set olNs = olApp.GetNamespace("MAPI")
        Set Fldr = olNs.GetDefaultFolder(13)
        Set olTsk = olApp.CreateItem(3)
     
        For Each Cell In Rng
            On Error Resume Next
            Set olTsk = Fldr.Items.Find("[Company] = " _
                    & Sheet1.Range("D" & Cell.Row).Value & " and [DueDate] = " _
                    & Format(Sheet1.Range("G" & Cell.Row), "ddd mm/dd/yyyy") & "")
            On Error GoTo 0
     
            If olTsk Is Nothing Then
                Set olTsk = Fldr.Items.Add
                With olTsk
                    .Subject = Sheet1.Range("D" & Cell.Row).Value
                    .Body = Sheet1.Range("E" & Cell.Row).Value
                    .Companies = Sheet1.Range("D" & Cell.Row).Value
                    .DueDate = Sheet1.Range("G" & Cell.Row).Value
                    .ContactNames = Sheet1.Range("F" & Cell.Row).Value
                    .Save
                End With
            End If
        Next Cell
        Set olTsk = Nothing
        Set olApp = Nothing
        ActiveSheet.ShowAllData
        Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    hi, it doesnt seem to work in the way in which i want it too. Attached is a similar program. if you right mouse click on the the "first day of holiday date" in a particular row and click on "add outlook appointment" it creates a calandar entry.

    This is would like this to do, rather than creating multiple task at a time use the same process as the above where you create an indivual task for a row by right clicking on a cell in that row.
    Attached Files Attached Files

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Creating an outlook Task from excel

    Hi jsmity

    Try the attached. The code is designed to fire on right click of any Open Actions cell in the range of D4 through G and last row. Let me know of issues.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    205

    Re: Creating an outlook Task from excel

    awsome thanks works brilliantly

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1