How to create a TaskRequestItem Object and send?

  • Thread starter Thread starter brAccess
  • Start date Start date
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.
 
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.
 
Back
Top