I would like to set the Body
of an AppointmentItem
to a string of RTF that contains an embedded image. Setting Microsoft.Office.Interop.Outlook.AppointmentItem.Body
results in the RTF appearing as-is in the appointment.
I have tried using Redemption which wraps the appointment and exposes an RTFBody
property, but the RTF formatting (including the image) is lost.
In this example (which doesn't have an embedded image) the RTF appears in the document as-is. Has anyone managed to do this?
var appointment = (AppointmentItem)app.CreateItem(OlItemType.olAppointmentItem);
appointment.Subject = "test subject";
appointment.Start = DateTime.Now;
appointment.End = DateTime.Now.AddHours(1);
appointment.Body = @"{\rtf1\ansi\deff0{\fonttbl{\f0 Arial;}}{\colortbl ;\red0\green0\blue255;}\pard\cf1\f0\fs24 Test}";
appointment.Save();