FormRegion not showing for custom draft MailItems in Outlook 2016 RRS feed

  • Question

  • Hi,

    I am developing a VSTO Outlook add-in with a FormRegion and MailItems with custom Fields (also custom MessageClass, like IPM.Note.CustomClass). The FormRegionMessageClass of the FormRegion is also set to the same MessageClass and the FormRegionName is set to Namespace.Classname (as described here

    As a side note, if I send a custom MailItem, the FormRegion shows up for the received element, but not for the draft MailItems. But I need the FormRegion to also show up for draft Items, because I populate the Items with values of another source (webservice). 

    In Outlook 2010 everything works as expected. The custom FormRegion shows up, if I select a MailItem with the custom MessageClass (even for draft items), but in Outlook 2016 it does not.

    So my question is, what has changed in Outlook 2016, that the FormRegion does not show up for draft items and how can I fix this. I am thankful for every answer.

    Tuesday, May 30, 2017 5:13 AM


  • Finally I found a solution myself.

    First of all, it's not the best solution and will cause problems when sending a MailItem that has been changed like that, especially when trying to respond to the item, because actually we never sent the item and the item didn't get an id from the exchange server. But if you can live with that,

    here is the code:

    string PR_MESSAGE_FLAGS = ""; mailItem.PropertyAccessor.SetProperty(PR_MESSAGE_FLAGS, 1);

    I don't know why microsoft decided to change the previous behavior.

    • Marked as answer by Recep Karadas Tuesday, May 30, 2017 9:33 AM
    Tuesday, May 30, 2017 9:32 AM