I need to read and write a custom column that I created in a process mailbox (public mailbox?) within Outlook.
I think I'm supposed to use the ExtendedPropertyDefinition somehow, however, I do not know how. I do not have the GUID for the column, if this makes sense.
I've named the custom column 'Engineer', and used this code, but I get 0 count for the ext props.
ExtendedPropertyDefinition myExtDef=
new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings,
"Engineer",
MapiPropertyType.String);
And then
PropertySet propertySet =
new PropertySet(BasePropertySet.FirstClassProperties, myExtDef);
Finally
foreach (Item item in findResults)
{
EmailMessage message =
EmailMessage.Bind(service, item.Id, new PropertySet(propertySet));
}
As I debug and check an 'item' in findResults, I see the subject property and all that, but the ExtendedProperties count is 0. Looks like a problem with the way I define my extended properties to me.
Can anybody help me how to read and write the custom column?
Edit: I'm now not so sure if this can be achieved at all using the managed API.. If there's anyone out there with some ideas, I'll take it. I've checked all the below, but to no avail.
Accessing custom contacts using EWS managed API http://msdn.microsoft.com/en-us/library/office/dd633697(v=exchg.80).aspx
And others...