To render an attachment in a message with plain text, retrieve the attachment's PR_RENDERING_POSITION property and apply it to the data in the PR_ATTACH_RENDERING property. There are two ways to retrieve PR_RENDERING_POSITION:
Keep in mind that many RTF-aware message stores do not calculate PR_RENDERING_POSITION until a client requests the PR_BODY property of a message. Until that time, PR_RENDERING_POSITION usually represents an approximate value. Message store providers are allowed to supply clients with an approximate value to enhance performance.
The rendering for a file or binary attachment is stored in its PR_ATTACH_RENDERING property. You have the choice of retrieving PR_ATTACH_RENDERING in the same ways as you retrieved PR_RENDERING_POSITION: directly from the attachment or from the attachment table. For PR_ATTACH_RENDERING, the first strategy, although more time-consuming, is safer. Because some message store providers truncate their table columns to 255 bytes, or in a few cases 510 bytes, it is difficult to be sure that the PR_ATTACH_RENDERING column contains the complete rendering. When retrieving the property directly from the attachment, it will always be complete.
Neither OLE nor message attachments set PR_ATTACH_RENDERING. Instead, rendering information for OLE 1 attachments is stored in the message text stream. For OLE 2 attachments, it is stored in a special child stream of the storage object. Rendering information for message attachments is available through the form manager.