Assign a task using MAPI Properties

  • Thread starter s s via OfficeKB.com
  • Start date
S

s s via OfficeKB.com

I am able to create a task and add to Task folder programmatically.
But not able to assign it.

I want to assign a task in Task folder through an application program.
What MAPI properties do I have to set so that the task item I create in
Task folder gets assigned to another user.
 
G

Guest

You must use the Assign method. See this sample from the Outlook VBA help
file:

Sub AssignTask()
Dim myOlApp As New Outlook.Application
Dim myItem As Outlook.TaskItem
Dim myDelegate As Outlook.Recipient
Set MyItem = myOlApp.CreateItem(olTaskItem)
MyItem.Assign
Set myDelegate = MyItem.Recipients.Add("Dan Wilson")
myDelegate.Resolve
If myDelegate.Resolved Then
myItem.Subject = "Prepare Agenda For Meeting"
myItem.DueDate = Now + 30
myItem.Display
myItem.Send
End If
End Sub
 

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