Move message from Inbox to Temp back to Inbox

Move message from Inbox to Temp back to Inbox

Post by eseitome » Wed, 07 Dec 2005 06:21:14


Hi,
I currently have a macro that creates a new task from an email. I wish
to make it so that once this task is set, that message is moved to a
temporary folder and then moved back to the Inbox the day before the
task is due. Any idea on how to that?
thanks in advance.
Nise
 
 
 

Move message from Inbox to Temp back to Inbox

Post by Dmitry Str » Fri, 09 Dec 2005 03:09:16

1. Move the message to the temp folder using
set MailItem = MailItem.Move(TargerFolder)
2. Store the new (moved) message entry id as a custom property using the
TaskItem.UserProperties collection (UserProperties.Add)
3. Read the stored entry id from UserProperties, open the message usingg
Namespace.GetItemFromID, move it to Inbox, update the custom property to the
entry id of the new (moved back to the Inbox) message.

Dmitry Streblechenko (MVP)
http://www.yqcomputer.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool