当前位置: 动力学知识库 > 问答 > 编程问答 >

outlook - Retrieving RTF text from Microsoft EWS

问题描述:

Would it be possible to get RTF content using Exchange Web Services.

Ews property set only allows body type HTML or plain text.

Thanks.

网友答案:

You need to use the PidTagRtfCompressed property to get create an extended property definition, and then add the extended property definition to your property set, then get the item using that property set. The response will contain the RTF data.

ExtendedPropertyDefinition PidTagRtfCompressed = new ExtendedPropertyDefinition(0x1009, MapiPropertyType.Binary);     
PropertySet propSet = new PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.Subject, PidTagRtfCompressed);     
EmailMessage message = EmailMessage.Bind(service, ItemId, propSet);
分享给朋友:
您可能感兴趣的文章:
随机阅读: