How to create a TaskRequestItem Object and send?

B

brAccess

How to create a TaskRequestItem Object and send?

Here is the example from Outlook help:
Unlike other Microsoft Outlook objects, you cannot create this object.
When the sender applies the Assign and Send methods to a TaskItem
object to assign (delegate) the associated task to another user, the
TaskRequestItem object is created when the item is received in the
recipient's Inbox.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("Jeff Smith")
myItem.Subject = "Prepare Agenda For Meeting"
myItem.DueDate = #9/20/97#
myItem.Send

How should I declare this variable (myDelegate) ?

I tried to declare as variant but they are sitting in the task list
and are not being sent to the assigned.
 
K

Ken Slovak - [MVP - Outlook]

It would be an Outlook.Recipient object. Make sure you resolve the
recipient you are adding, otherwise the symptoms you describe will
occur:
myDelegate.Resolve
If myDelegate.Resolved Then
'OK, can send
Else
'not resolved
End If

If the recipient has more than 1 email address in the contact record
resolution may fail.
 

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