
create task item for self
With the following code, I can assign a task to members of my staff, but
can't assign one to myself lest I receive the 'You cannot send a task
request to yourself.' error. Digging in the object model revealed the
TaskOwnership property of the TaskItem, but I can't seem to get the syntax
right. Any suggestions would be most appreciated; otherwise I'll have no
work to do myself! :) TIA
~Shane
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim myOlApp As Outlook.Application
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olTaskItem)
myitem.Assign
Set myDelegate = myitem.Recipients.Add("any member of my staff")
myitem.Subject = "task subject"
myitem.DueDate = #date#
myitem.Send