Formatted Text in MAPI

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The text of a message can be stored and transmitted using plain text or formatted text. Formatted text enhances the message text by altering its appearance with, for example, one or more fonts, font sizes, or text colors. It is recommended that all clients and whenever possible, all message store providers, support formatted text. Supporting formatted text in messages adds value by improving message readability and making message handling easier and more efficient.

Formatted text can be implemented in a variety of ways. The most common way is with the Rich Text Format (RTF). MAPI defines three transmittable properties for holding message text information: PR_BODY (PidTagBody) for plain text, PR_HTML (PidTagHtml) for HTML, and PR_RTF_COMPRESSED (PidTagRtfCompressed) for RTF text that has been compressed. Because the formatted version of a message text can be twice as large as the version without the formatting, the RTF text is compressed before it is transferred with the message and stored in the PR_RTF_COMPRESSED property. When it is time to display the message on the screen, it is uncompressed using a utility function provided by MAPI.

MAPI defines these two message text properties and mechanisms for conversion between them so that RTF-aware clients can interoperate with clients and messaging systems that do not support formatted text.