View Single Post
  #1  
Old July 21st 09, 07:13 PM posted to microsoft.public.outlook.program_vba
MrBaseball34
external usenet poster
 
Posts: 2
Default TaskItem assignment

I am trying to assign a TaskItem to multiple users and having some
difficulty figuring out if I'm doing the steps correctly. I am using
Delphi so, please, don't gag it should all work the same. I'm almost
done with this project
and this is the last sticking point. Please help...


// pmOutlook is my created Outlook COM instance
TaskItem := pmOutlook.CreateItem( olTaskItem );
// Assign properties here
TaskItem.Assign;
// slUserAddrs is a stringlist (similar to an array)
// that has the recipient's email addresses
for i := 0 to slUserAddrs.Count -1 do
begin
Recipient := TaskItem.Recipients.Add('"'+slUserAddrs[i]+'"');
// Is this required?
// Recipient.Resolve;
end;
// Do I save before I send?
TaskItem.Save;
TaskItem.Send;

Ads