Using the EWS-managed api v1.1, I can successfully save / set the "Contact" contact or an honorable (if you want) non-empty value, but I canβt figure out how to remove it or set it to an empty / null line.
I tried setting an empty value and . I tried to remove the extended property. Here is the relevant code.
var titleDef = new ExtendedPropertyDefinition(0x3A45, MapiPropertyType.String); // works when set to a non-empty string value ewsContact.SetExtendedProperty(titleDef, "Mr."); // throws null argument exception when set to String.Empty or null ewsContact.SetExtendedProperty(propDefinition, String.Empty); // isRemoved is equal to false and the value doesn't change var isRemoved = ewsContact.RemoveExtendedProperty(titleDef);
I also tried using a different overload in ExtendedPropertyDefinition, as mentioned in this very similar question , but that did not change my final result for deleting the property. I'm not sure I understand the difference in the two signatures for the constructor.
var titleDef = new ExtendedPropertyDefinition(new Guid("{00062004-0000-0000-C000-000000000046}"), 0x3A45, MapiPropertyType.String);
Brute force
I suppose I can take a full copy of the contact (without a name) and delete the original, but this is a bit like the top and is likely to cause other errors.
source share