Rendering an Attachment in RTF Text
Applies to: Outlook 2013 | Outlook 2016
Rich Text Format (RTF)-aware clients can retrieve rendering position information from RTF message text by looking for the following escape sequence in the message's PR_RTF_COMPRESSED (PidTagRtfCompressed) property:
\objattph
To locate rendering information in formatted text
Call IMessage::GetAttachmentTable to access the message's attachment table. For more information, see IMessage::GetAttachmentTable.
Build a property restriction that limits the table to rows that have PR_RENDERING_POSITION not equal to -1. For more information, see PR_RENDERING_POSITION (PidTagRenderingPosition).
Call IMAPITable::Restrict to enforce the restriction. For more information, see IMAPITable::Restrict.
Call IMAPITable::SortTable to sort the attachments. For more information, see IMAPITable::SortTable.
Call IMAPITable::QueryRows to retrieve the appropriate rows. For more information, see IMAPITable::QueryRows.
Call the message's IMAPIProp::OpenProperty method to retrieve PR_RTF_COMPRESSED with the IStream interface. For more information, see IMAPIProp::OpenProperty and PR_RTF_COMPRESSED.
Scan the stream, looking for the rendering placeholder,
\objattph
. The character following this placeholder is the place for the next attachment in the sorted table.