I trying to set the format of an appointment body to RTF using a VSTO add-in. The below instruction works fine with Outlook 2010,2013:
appointmentFormat = Convert.ToInt32(appointmentItem.GetType().InvokeMember("BodyFormat",
System.Reflection.BindingFlags.GetProperty, null, appointmentItem, null));
if (appointmentFormat != 3)
{
appointmentItem.GetType().InvokeMember("BodyFormat", System.Reflection.BindingFlags.SetProperty, null, appointmentItem, new object[1] { 3 });
}
It seems that the property is managed differently in Outlook 2016 and using the same instructions will generate the below error as the property does not exist.
Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME)
Is there a way to set appointment body formats with outlook 2016?
User contributions licensed under CC BY-SA 3.0