MAPI Properties

Description: Contains the Rich Text Format (RTF) version of the message text, usually in compressed form.
Property ID: $1009
Property type: PT_BINARY
Area: E-mail

This property contains the same message text as the PR_BODY (PidTagBody) property but in RTF.

Message text in RTF is normally stored in compressed form. However, some systems do not compress formatted text. To accommodate them, MAPI provides the dwMagicUncompressedRTF value for a stream header to identify uncompressed RTF, and the STORE_UNCOMPRESSED_RTF flag in PR_STORE_SUPPORT_MASK (PidTagStoreSupportMask) for the message store to indicate it can store uncompressed RTF.

To obtain the contents of this property, call OpenProperty, then call WrapCompressedRTFStream with the MAPI_READ flag. To write into this property, open it with the MAPI_MODIFY and MAPI_CREATE flags. This ensures that the new data completely replace any old data and that the writes are performed using the minimum number of store updates.

Message stores that support RTF ignore any changes to white space in the message text. When PR_BODY is stored for the first time, the message store also generates and stores this property. If the IMAPIProp::SaveChanges method is subsequently called and PR_BODY has been modified, the message store calls the RTFSync function to ensure synchronization with the RTF version. If only white space has been changed, the properties are left unchanged. This preserves any nontrivial RTF formatting when the message travels through non-RTF-aware clients and messaging systems.