简体   繁体   English

设置EWS约会/任务RTF正文

[英]Set EWS appointment/task RTF body

How can I set a ewsAppointment/ewsTask rtf body? 如何设置ewsAppointment / ewsTask rtf正文? Looks possible through an extended property, but I can't get this to work. 通过扩展属性看起来可能,但是我无法使用它。

I was trying with getting the extended property like this - 我正在尝试获得这样的扩展属性-

ExtendedPropertyDefinition epd = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,"PR_RTF_COMPRESSED",MapiPropertyType.Binary);

and setting it to a byte array of my rtf text - but that's not working. 并将其设置为我的rtf文本的字节数组-但这不起作用。

Also - I'm trying to figure out if I should stick with html/rtf. 另外-我试图弄清楚我是否应该坚持使用html / rtf。 Looking at EWS manged API - Appointment with Html Body and Outlook 2013 and links on that post, it sounds like it might be safer to always set RTF. 查看EWS托管的API-使用Html Body和Outlook 2013进行约会以及该帖子上的链接,听起来好像总是设置RTF可能更安全。 Is this correct? 这个对吗?

Thanks! 谢谢!

Your property definition is incorrect it should be 您的媒体资源定义不正确,应该是

ExtendedPropertyDefinition epd = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary);

as per https://msdn.microsoft.com/en-us/library/office/cc815911.aspx because this is a tagged property. 按照https://msdn.microsoft.com/zh-cn/library/office/cc815911.aspx,因为这是带标记的属性。

it sounds like it might be safer to always set RTF. 听起来好像总是设置RTF可能更安全。 Is this correct? 这个对吗?

With Contacts and Appointment generally yes but you need to make sure you get the CompressedRTF format correct. 对于“联系人和约会”,通常是,但是您需要确保正确使用CompressedRTF格式。 You may also need to modify some of the other properties listed in https://msdn.microsoft.com/en-us/library/hh369831(v=exchg.80).aspx 您可能还需要修改https://msdn.microsoft.com/zh-cn/library/hh369831(v=exchg.80).aspx中列出的其他一些属性。

Cheers Glen 干杯格伦

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM