Microsoft.Office.Interop.Outlook.AppointmentItem bodyformat Outlook 2016

0

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?

vsto
outlook-addin
outlook-2016
asked on Stack Overflow Jan 2, 2018 by Salim • edited Jan 2, 2018 by Salim

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0