Results 1 to 18 of 18

create/assign Outlook tasks from a range of cells

Threaded View

  1. #1
    Registered User
    Join Date
    05-15-2008
    Posts
    9

    create/assign Outlook tasks from a range of cells

    I have had some help with this (thanks!) but am stuck.

    Can someone add to the code below and make it so that multiple tasks, with multiple assignees, can be created from a range of cells, such as:
    Column A Column B
    Row 1 Task Subject Assign to
    Row 2 GV LP for AZ John Brown
    Row 3 GV LP for CO John Brown
    Row 4 GV LP for IL Suzy Smith
    Row 5 GV LP for IN Suzy Smith
    Row 6 GV LP for KY Suzy Smith
    Row 7 GV LP for MN Suzy Smith
    Row 8 GV LP for MS Bob Barker
    Row 9 GV LP for NC Bob Barker
    Row 10 GV LP for NJ Bob Barker
    Row 11 GV LP for NM Bob Barker
    Row 12 GV LP for NV Bob Barker
    Row 13 GV LP for NY Bob Barker
    Row 14 GV LP for OH Bob Barker
    Row 15 GV LP for SC Bob Barker
    Row 16 GV LP for WV Bob Barker
    (Sorry, it didn't translate well. The "GV LP for AZ" is cell A2, "John Brown" is cell B2.)

    Here is the code I have so far:
    Sub CreateTask()
    Const olTaskItem = 3
    Dim oOlookApp As Object
    Dim oOlookTask As Object
    Dim rng As Range
        Set oOlookApp = CreateObject("Outlook.Application")
        
        Set rng = Range("A1")
        
        While rng.Value <> ""
            Set oOlookTask = oOlookApp.CreateItem(olTaskItem)
               
            With oOlookTask
                .Subject = rng.Value
                .Save
            End With
            Set rng = rng.Offset(1)
            
        Wend
    End Sub
    This creates the tasks but assigns them to me.

    Can anyone help?

    I would also like to have a due date column, but it is not absolutely necessary.

    Thanks!

    David
    Last edited by royUK; 05-16-2008 at 11:23 AM.

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