Saved Property of MailItem is copied

S

Scratch Head

Hi,

I wish to copy the original mail to another separate folder. My code is as
follows:

using Outlook = Microsoft.Office.Interop.Outlook

MailItem mailItem; // mailItem is set accordingly.

Outlook.Namespace namespc = mailItem.Application.GetNamespace("MAPI");
Outlook.folder =
(Outlook.Folder)namespc.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);
Outlook.MailItem tempMail = (Outlook.MailItem)mailItem.Copy(); // This is
the statement where mailItem.Saved changes from true to false
Outlook.MailItem newMail = (Outlook.MailItem)tempMail.Move(folder);

Pls advise why this phenomenon is observed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top