【发布时间】:2014-06-12 03:59:57
【问题描述】:
是否可以使用 Exchange Web 服务获取 RTF 内容。
Ews 属性集只允许正文类型 HTML 或纯文本。
谢谢。
【问题讨论】:
-
您是否尝试从现有消息中以 RTF 格式获取它?还是您正在创建新消息并希望将 RTF 内容放入新消息中?
-
@MimiGentz,我正在尝试获取现有消息。
-
压缩 RTF 有一个扩展属性。我没有在 RTF 消息上对此进行测试,但我认为如果您在属性集中包含扩展属性定义,您应该能够检索该属性的内容。
ExtendedPropertyDefinition PidTagRtfCompressed = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary); PropertySet propSet = new PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.Subject, PidTagRtfCompressed); EmailMessage message = EmailMessage.Bind(service, ItemId, propSet); -
你有机会尝试吗?
-
@MimiGentz - 是的。不幸的是它没有工作。var PidTagRtfCompressed = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary);var propertySet=new PropertySet(new PropertyDefinitionBase[] { ItemSchema.MimeContent, ItemSchema.Subject, PidTagRtfCompressed });message.Load(propertySet);将 mimecontent 保存到 eml,当我查看内容时,没有 RTF 内容。只有 HTML 和纯文本。尝试使用 Outlook 加载 eml,仍然显示 HTML。
标签: outlook rtf exchangewebservices