我试图在Outlook约会正文中显示HTML内容,但无法(我尝试对body和FTFbody选项进行尝试)。 任何人请帮助我。 下面是我的代码。
private void button1_Click(object sender, RibbonControlEventArgs e)
{
Outlook.Application application = Globals.ThisAddIn.Application;
Outlook.Inspector inspector = application.ActiveInspector();
Outlook.AppointmentItem AppointmentItem = inspector.CurrentItem as Outlook.AppointmentItem;
if (AppointmentItem != null)
{
if (AppointmentItem.EntryID == null)
{
string messageBody = string.Empty;
string defaultMessageBody = "Click here ";
AppointmentItem.Subject = "This text was added by using code";
AppointmentItem.Recipients.Add("testuser1@gmail.com");
AppointmentItem.Location = "INDIA";
//AppointmentItem.RTFBody = System.Text.Encoding.Default.GetBytes(defaultMessageBody);
AppointmentItem.Body = defaultMessageBody;
AppointmentItem.Save();
}
}
}