Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用压缩的RTF正文通过EWS创建约会?_C#_Exchangewebservices_Rtf - Fatal编程技术网

C# 如何使用压缩的RTF正文通过EWS创建约会?

C# 如何使用压缩的RTF正文通过EWS创建约会?,c#,exchangewebservices,rtf,C#,Exchangewebservices,Rtf,我想通过EWS创建一个带有压缩RTF正文的约会,而不是默认的HTML格式,因为HTML格式的约会正文中存在一些错误 我使用的代码与下面的代码类似: var appointment = new Appointment(exchangeService); ... string html = // html body string compressedRtf = // converted using Microsoft.Exchange.Data.TextConverters ... var epd

我想通过EWS创建一个带有压缩RTF正文的约会,而不是默认的HTML格式,因为HTML格式的约会正文中存在一些错误

我使用的代码与下面的代码类似:

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);
保存时会引发“内容转换失败”异常。这里有什么明显的问题吗?我还没有找到文档或代码示例,只是一些提示,我可能需要设置额外的扩展属性才能使其正常工作