How can I created an Appointment through EWS with a compressed RTF body?

…衆ロ難τιáo~ 提交于 2019-12-11 07:35:49

问题


I would like to create an Appointment through EWS with a compressed RTF body instead of the default HTML format due to several bugs w/ Exchange around HTML formatted appointment bodies.

The code I am using looks similar to that below:

var appointment = new Appointment(exchangeService);
...
string html = // html body
string compressedRtf = // converted using Microsoft.Exchange.Data.TextConverters
...
var epd = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary);
appointment.SetExtendedProperty(epd, 
    System.Text.Encoding.UTF8.GetBytes(compressedRtf));
...
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

This throws a "Content conversion failed." exception when Saved. Is there anything glaringly wrong here? I have not been able to find documentation or code samples, just a few hints that I may need to set additional Extended Properties to get this to work.

来源:https://stackoverflow.com/questions/45731242/how-can-i-created-an-appointment-through-ews-with-a-compressed-rtf-body

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!