Home Create Outlook user properties from EWS
Reply: 1

Create Outlook user properties from EWS

Utsarga Sikder
1#
Utsarga Sikder Published in 2014-08-07 13:24:14Z

I'm trying to create an application that determines properties of emails that come into an Exchange inbox and stores the properties of the email in UserProperties so they can be viewed in Microsoft Outlook.

The only way to set UserProperties of an Outlook email that I'm currently aware of is through the MailItem object in the Outlook Addin API. However, I don't want the setting of these properties to rely on the user having Outlook open so the Addin can run. Ideally, the setting of the user properties would happen regardless of whether the user opened Outlook or not.

With that in mind, I turned to EWS, a library for accessing Exchange emails through the Exchange server instead of Microsoft Outlook. Unfortunately, the EmailMessage object in EWS exposes a different custom properties object (ExtendedProperties) than MailItem's UserProperties property. Because of this, I'm not sure how to set UserProperties in EWS.

I found this StackOverflow answer (Access Outlook user properties from EWS) that shows how to get user properties that are already set. I would like to set user properties for an EmailMessage that haven't been set before.

So the bottom line question is: How do I set UserProperties of an EmailMessage using EWS?

Thanks!

Dmitry Streblechenko
2#
Dmitry Streblechenko Reply to 2014-08-07 13:34:39Z

Outlook stores properties' definitions in another named MAPI property (you can see it in OutlookSpy if you select a message with the user property set and click IMessage button). the actual value is stored in another MAPI property

If your Outlook view is configured to show a particular user property, the property value will be shown even if the blob with the definitions is missing.

Try to set just the property value...

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.339317 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO