Problem with task creation

D

Daniel.C

OutLook 2007.
I'm creating tasks and I want to check off the "send me a status report
when this task is complete". So far, i found no property to do it.
Any help welcome.
 
K

Ken Slovak - [MVP - Outlook]

There is no true/false setting like that for code. You have to use the
StatusUpdateRecipients and StatusOnCompletionRecipients strings or set up
the Recipients collection of the task item for that.

StatusOnCompletionRecipients is the Bcc set of recipients,
StatusUpdateRecipients are the Cc recipients.
 
D

Daniel.C

Thanks, but it didn't work. Here is my code :

Set MyOutlook = CreateObject("Outlook.Application")
Set myTask = MyOutlook.CreateItem(3)
myTask.assign
With myTask
.Recipients.Add ("[email protected]")
.StatusOnCompletionRecipients = ""
.StatusOnCompletionRecipients = ""
.Display
End With
Set myTask = Nothing
Set MyOutlook = Nothing

Can you tell me what's wrong ?
TIA
 
D

Daniel.C

Oops.
Set MyOutlook = CreateObject("Outlook.Application")
Set myTask = MyOutlook.CreateItem(3)
myTask.assign
With myTask
.Recipients.Add ("[email protected]")
.StatusOnCompletionRecipients = ""
.StatusUpdateRecipients = ""
.Display
End With
Set myTask = Nothing
Set MyOutlook = Nothing
TIA
 
K

Ken Slovak - [MVP - Outlook]

Dim oRecipCC As Outlook.Recipient
Dim oRecipBCC As Outlook.Recipient

With myTask
' StatusUpdateRecipients
.Set oRecipCC = Recipients.Add ("[email protected]")
oRecipCC.Type = olCC
oRecipCC.Resolve

' StatusOnCompletionRecipients
Set oRecipBCC = Recipients.Add ("[email protected]")
oRecipBCC.Type = olBCC
oRecipBCC.Resolve

.Display
End With
 
D

Daniel.C

Thanks for answering. I surely miss something. When I execute the code,
I display a task without main recipient and without send button.
Can you help me further more ?
Daniel
 
Top