none
How to handle opening event for mail item in draft folder RRS feed

  • Question

  • HI All,

    My requirement is that when user click on save button, I have to save modified mail in draft. for this, I have used repurpose controls for save button. At click of save, I create new mail item in draft folder as per my requirement. I am creating it in following way ;--

                    Microsoft.Office.Interop.Outlook.NameSpace olNamespace = Globals.DarkMail.Application.GetNamespace("MAPI");
                    Store currentStore = Globals.DarkMail.Application.ActiveExplorer().CurrentFolder.Store;

    MAPIFolder draftFolder = currentStore.GetDefaultFolder(OlDefaultFolders.olFolderDrafts);

    MailItem revisedMailItem = (MailItem)draftFolder.Items.Add("IPM.NOTE");

    //modify revised mail item

                            revisedMailItem.Save();
                            Marshal.ReleaseComObject(revisedMailItem);
                            Marshal.ReleaseComObject(draftFolder);
                            Marshal.ReleaseComObject(currentStore);

    Now my problem is when I am opening this saved mail from draft folder (mail appears in editing mode), I am not receiving any open event for that mail item. 

    Strange thing is that I am able to get this event in normal draft mail. Am I doing something wrong here ?

    Can some body please suggest that what would be right way to do it ? I was expecting that I will get open event in each case (as I get it even when I click on new mail).

    please suggest.

    Thanks

    Devendra


    Wednesday, September 6, 2017 3:17 PM

Answers

All replies