Results 1 to 12 of 12

Outlook Tasks

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Outlook Tasks

    I have searched and think I have found what I need to create Outlook tasks from my Excel spreadsheet. I'm hoping that someone here can help me pull it together into something that will be usable in my project tracking spreadhsheet...

    I try to keep track of milestones... these milestones are listed in column B of my spreadsheet and are in rows 10 through about 105

    For each of my customers I then keep 4 columns D, E, F, G - H, I, J, K - L,M,N,O - etc. Each group of 4 is a different customer....

    The customer's first column (D, H, L, etc.) is a Due date of the Milestone that is found in column B.
    The second column is a check box that I use to indicate when the milestone is complete
    The 3rd column is the completion date
    The last colum is just a filler space that helps to separate each customer.

    What I would like to do is insert a button at the bottom of EACH grouping of 4 that when pressed would look at the first column for the customer group and for ANY Milestone that has a DUE date process the stuff in the VB below to create an OUTLOOK task for each item that has a DUE date. (It would be conceivable that as it stepped through each row for a customer group of columns that I could have it create 90+ Tasks in Outlook.

    A couple of additional things... in row 110 for the first column of the customer I have a DATE or a blank. So for example in D110 it might be blank or a date like 10/29/2007. If it is blank then when I press the button it would loop through ADD the tasks for each row with a due date. If row 110 has a DATE I would get a popup indicating that the tasks are already in OUTLOOK and that they were added on whatever the date is in row 110... This is kind of the safeguard that I don't get the same group of tasks multiple times by pressing the button by mistake.

    Sub CreateTask()
    
        Dim olApp As Outlook.Application
        Dim olTsk As TaskItem
    
        Set olApp = New Outlook.Application
        Set olTsk = olApp.CreateItem(olTaskItem)
    
        With olTsk
            .Subject = [VALUE of Customer column 2, row3  -  PLUS the Milestone TEXT found in column B for whichever row is being processed]
            .Status = olTaskInProgress
            .DueDate = [This is the DUE date that is found on the ROW being processed in the first customer column]
            .Save
        End With
    
        Set olTsk = Nothing
        Set olApp = Nothing
    
    End Sub
    After all of the ROWS for a specific customer are processed update row 110 with the date that everything was processed.

    I have included a picture of what my data looks like.

    If I press the button on the first grouping of 4 I would get the popup telling me I already added them. If I pressed the button on the second grouping of 4 it would add an Outlook task called: Sample Customer - AP Training Scheduled with a DUE date of 10/10/2007. It would also put into H110 today's date so that if I push the button again it would not process.

    Any help that anyone can provide would be greatly appreciated... I don't know much about VB programming.
    Attached Images Attached Images

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