Read the custom field (extended property) in Outlook Add-in... RRS feed

  • Question

  • I have created an appointment with the custom field (extended property) using EWS, and then trying to read the custom field (extended property) in Outlook Add-in when user open the appointment in Outlook.

    Code for creating Extended Property using EWS :

    ExtendedPropertyDefinition extendedProperty = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, "CustomGUID",

                    appointment.SetExtendedProperty(extendedProperty, "my custom Id");

    And also we are persisting appointment.Id.UniqueId in our database.

    But in Outlook Add-in I am not able to access neither UniqueId nor extended property for an appointment creared from EWS. 

    Wednesday, October 17, 2012 10:00 AM


All replies

  • I am able to resolve this issue by adding with public strings...

    ExtendedPropertyDefinitionextendedProperty = newExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "CustomGUID",MapiPropertyType.String);

    Appointment.SetExtendedProperty(extendedProperty,"my custom Id");

    Reading this value in OutLook Addin as...

    AppointmentItem appointment = (Item as AppointmentItem);

    object customPro = appointment.PropertyAccessor.GetProperty("{00020329-0000-0000-C000-000000000046}/CustomGUID");
    Wednesday, October 17, 2012 10:43 AM
  • Hi MuraliKris,

    I am glad to hear that you have got it working to resovle this issue.

    Thanks for sharing your resolution in the forum. It will be very beneficial for other community members who have the similar problem.

    Have a nice day.

    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, October 18, 2012 2:26 AM