When programmatically create a new e-mail following code is used:
solutionRoot = rootStoreFolder.Folders.Add("MyInboxFolder", Outlook.OlDefaultFolders.olFolderInbox) as Outlook.Folder;
folder = solutionRoot.Folders["MyFolderName"] as Outlook.Folder;
subFolder = folder.Folders["MyFolderSubName"] as Outlook.Folder;
Outlook.MailItem mailItem = this.Application.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
mailItem.Subject = "TestSubject";
mailItem.To = "[email protected]";
mailItem.Body = "This is the message.";
mailItem.Importance = Outlook.OlImportance.olImportanceLow;
mailItem.Display(false);
mailItem.Move(subFolder);
The result is the creation of a new message with a send button placed into folder subFolder.
The question is: what code should I use in order to create an new mail item into the folder called subFolder, but not a new e-mail ready to be sent, an e-mail which has been received and read already, an existing e-mail.