View Single Post
  #5  
Old April 19th 10, 02:38 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How can I create a new MailItem inside a user folder?

What do you mean "set a message as a task"? They are 2 different objects and
MessageClass's. If you want to create a task item create one and copy any
property values from your email message item to the task that you want (such
as Subject or body text, etc.).

You cannot use the Outlook object model to create an item that looks sent.
You can use Extended MAPI or a 3rd party library, Redemption
(www.dimastr.com/redemption) to do that. You'd have to set various
properties such as sender addresses and so on to the values you want as well
as the Sent property before the new item you create is saved the first time.
There's a code sample showing that at the Redemption Web site.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"cbukeo via OfficeKB.com" u59160@uwe wrote in message
news:a6a004c1c7866@uwe...
Ken,
Now I am able to move messages around within folders. However, the
messages
stay as drafts. How can I set their sent status to true? This is also
causing
problems if I try to set them as tasks. OOM throws an exception
complaining
that a draft message cannot be set as a task.
Many thanks again
Buke


Ads