Supporting RTF Text for Message Store Providers

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Some client applications allow users to use Rich Text Format (RTF) text in their messages. If your message store provider needs to support RTF text in messages, it needs to handle the PR_RTF_COMPRESSED (PidTagRtfCompressed) property, in addition to the PR_BODY (PidTagBody) property. Primarily, this means storing both properties, and making sure that PR_BODY contains a plain text version of the text in PR_RTF_COMPRESSED. The RTFSync function is useful for this purpose.

There are two flags that can be set in the message store object's PR_STORE_SUPPORT_MASK (PidTagStoreSupportMask) property that tell clients what they can expect from the message store provider with respect to the PR_BODY and PR_RTF_COMPRESSED properties on messages in the message store. The STORE_RTF_OK flag indicates that the store can generate the value of the PR_BODY property from the PR_RTF_COMPRESSED property dynamically, which relieves clients from the burden of synchronizing them explicitly. The STORE_UNCOMPRESSED_RTF flag indicates that the message store provider can support uncompressed data in PR_RTF_COMPRESSED.

Message store providers that do not support RTF text need to delete the PR_RTF_IN_SYNC (PidTagRtfInSync) property when the PR_BODY property changes in order to interoperate properly with client applications that do support RTF text.

See Also

Concepts

Message Store Features