Link to home
Start Free TrialLog in
Avatar of AdviceExpert
AdviceExpert

asked on

How do I insert HTML code to Outlook AppointmentItem body

Is there any way I can insert HTML formatted code inside AppointmentItem body?
Currently I'm using C# to edit HTMLBody on MailItem, but I couldn't find a HTMLBody on AppointmentItem.
Or is there any workaound to do this? e.g. using the AppointmentItem's word editor?


Microsoft.Office.Interop.Outlook.Application outlookApp = new Microsoft.Office.Interop.Outlook.Application();
 
AppointmentItem objApp = (AppointmentItem)outlookApp.CreateItem(OlItemType.olAppointmentItem);
 
objApp.Subject = "the title";
 
objApp.Location = "the location";
 
// Appointment will display this as plain string, while I want it to be in html format
objApp.Body = "<html><title>the title</title><body><p>the content goes here</p></body></html>";
 
objApp.Start = DateTime.Now;
 
objApp.Save();

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of texas_tl
texas_tl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial