Search code examples
outlookoutlook-addinexchangewebservices

Copy data from EWS Extended property to Outlook item UserProperty


In my plugin i use ExtendedProperty for save some metadata on it. I set values of ExtendedProperties using EWS. I receive requirement for not use EWS anymore and it's allowed to connect to Outlook only. SO i see that i can use UserPropery of MailItem. So i have to migrate old data by some way. Firs that come to my mind is query all items that have specific Extended Property using EWS and copy values to MailItem.UserProperty. Does anyone know how to query it from EWS or maybe you have another ideas how to migrate this data?


Solution

  • Using ExtendedProperties with EWS essentially creates custom MAPI properties on Outlook items, which are also accessible in the Outlook Object Model via the UserProperties collection or via a PropertyAccessor. You shouldn't need to migrate anything.