0

I am stuck with the problem that if I am trying to create a vote by setting the ExtendedProperty in an EmailMessage it wont show up in the Email. This is what I got so far:

Guid MyPropertySetId = new Guid("{00020329-0000-0000-C000-000000000046}");

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(MyPropertySetId, 0x00008520, MapiPropertyType.String);
MessageToAddTo.SetExtendedProperty(extendedPropertyDefinition, "yes;no");

I thought I finally have to right solution after reading this post: How to access extended properties set with EWS when accessing the item in VSTO for Outlook

The property is definitly set when sending the mail but when I am receiving the mail the vote is missing.

mxmlntr
  • 47
  • 5

1 Answers1

0

While you trying to set the correct property the PidLidVerbStream property http://msdn.microsoft.com/en-us/library/ee218541(v=exchg.80).aspx is a binary property with a complex byte stream value as documented above. Here's some examples of setting that https://gsexdev.blogspot.com/2015/01/sending-message-with-voting-buttons.html and https://gsexdev.blogspot.com/2015/08/owa-voting-button-compose-app-for.html. For your property definition you just need

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common, 0x00008520, MapiPropertyType.Binary);
Glen Scales
  • 20,495
  • 1
  • 20
  • 23