Outlook MailItem Custom Fields not updating
Posted on 2008-11-09
Our company has been working on an Outlook AddIn using VSTO which has a number of issues which we have not been able to resolve yet. We have versions of the AddIn for both Outlook 2003 and Outlook 2007.
In our .NET addin we have created a couple of custom fields specific to our application on the Inbox folder. These link to user properties we create on the mail items. In code when we set the values for these user properties, we are calling mailItem.Save() both before and after to ensure the values get persisted.
We are noticing that sometimes the field value shown in the Inbox is not updating. Yet if we manually go into the mail item afterwards and save it from the GUI, it then updates properly. But closing Outlook and re-opening it or changing folders doesn't make it update. This appears to happen most often on mail items which have just been forwarded or replied to. We are unsure why the custom fields don't update sometimes and how to fix this.
Any help much appreciated.