I'm trying to create a new contact using the EWS API. I can set all the values i needed except the contact title property. I tried the code:
oContact = new Contact(oService);
oContact.GivenName = "John";
oContact.Surname = "Doe";
oContact.Displayname = oContact.Surname;
// set the title property as extended property
// reference: http://msdn.microsoft.com/en-us/library/gg274394.aspx
ExtendedPropertyDefinition oTitleProp = new ExtendedPropertyDefinition(
new Guid("{00062004-0000-0000-C000-000000000046}"),
0x3A45,
MapiPropertyType.String);
oContact.SetExtendedProperty(oTitleProp, "Mr.");
oContact.Save();
I'm not getting an error but when i check the title field in outlook 2010, it's empty. I’m using Exchange 2010.
Any ideas what i did wrong?
Kind regards
Volkmar