none
ActiveInlineresponse MailItem.Move action in Outlook 2013? RRS feed

  • Question

  • Hello All,

    The MSDN states that MailItem.Move() can not be used for inline response in outlook 2013. I have saved the mail item in the drafts folder via MailItem.Save(). Just wondered if there is any work around for using Move method in this Mail Item ?

    I need to check for a case where if a mail is tried to be sent as inline response, I need to move it to the drafts folder.

    Following is the logic I have implemented:

    private void SendingMailInline(bool ref cancel)

    {

    Outlook.MailItem ItemToSend = Explorer.ActiveInlineResponse as Outlook.MailItem;

      if( ItemTosend != null )       

    {

    // some logic

                     ItemToSend.Save();   // Saves in the drafts folder

                     cancel = true;

     Outlook.MAPIFolder DraftsFolder =    (Outlook.MAPIFolder)                                                                            Explorer.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);

                     // when I try doing ItemTosend.Move(DraftsFolder) it throws exception saying this action                            // cannot be done for inline response

    }

             SendingMailInline  has been registered correctly. 

    Thanks in advance,

    Best,

    Sreeram

    Wednesday, April 3, 2013 3:11 AM

Answers

  • There are no workarounds to use any of the banned methods when the compose item is in inline response mode.  Your #2 assumes there's a difference in the save operation, but there is none.  OL 2013 simply doesn't want you to mess with inline response items, and AFAIK the restriction is in the internal UI and not reflected in MAPI props.

    Don't mess with Draft items! You'll get problems - there be dragons.


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Wednesday, April 3, 2013 3:10 PM
    Moderator

All replies

  • Maybe I'm missing something, but why are you trying to move a draft message to the Drafts folder?  In Outlook 2013, it looks like it's in the Inbox but it's still in the Drafts folder (or whatever folder the user has specified to use for the Drafts folder).

    There should be no need for you to move drafts, EVER.  You'll simply break things.


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    • Proposed as answer by Rahul Kishore Tuesday, September 23, 2014 9:16 PM
    Wednesday, April 3, 2013 2:04 PM
    Moderator
  • Dear Eric,

    Many thanks for the reply. I do agree that MailItem.Save() will keep a copy of it in drafts. What I need to do is to move a mail item from Drafts to my own customized folder, say "sample",  programmatically.

    When I try to move a mail from drafts to "sample", I am able to do it using MailItem.Move() method, when invoked through inspector, but I am not able to do the same in case of InlineResponse (Outlook 2013).

    1.Is there any work around to do that with the Inline Response as well ?

    2. How is the mail saved in drafts via an inspector differ from that done using the inline response, in outlook 2013? Is there any particular MAPI property that is causing the difference in the two cases?

    Thanks!

    Best,

    Sreeram

    Wednesday, April 3, 2013 2:34 PM
  • There are no workarounds to use any of the banned methods when the compose item is in inline response mode.  Your #2 assumes there's a difference in the save operation, but there is none.  OL 2013 simply doesn't want you to mess with inline response items, and AFAIK the restriction is in the internal UI and not reflected in MAPI props.

    Don't mess with Draft items! You'll get problems - there be dragons.


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Wednesday, April 3, 2013 3:10 PM
    Moderator