Creating Outlook tasks from Excel

D

David

I am trying to do something similar to this post
http://www.microsoft.com/communitie...64c58b-60a1-4e77-845c-bb886df409d2&sloc=en-us

I have this code working:
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 will create the tasks from a list in column A and assigns them to me.

What I need is the tasks to be assigned to people who I have listed in
column B.

How can this code be modified to assign the tasks?

Thanks!
 
K

Ken Slovak - [MVP - Outlook]

Look at the Assign() method of the task item. Look at the VBA Object Browser
Help on that method to see some sample code for working with that method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top