Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


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.

Makes sure that the Rich Text Format (RTF) message text matches the plain text version. It is necessary to call this function before reading the RTF version and after modifying the RTF version.

Header file:


Implemented by:


Called by:

RTF-aware client applications and message store providers

  LPMESSAGE lpMessage,
  ULONG ulFlags,
  BOOL FAR * lpfMessageUpdated


[in] Pointer to the message to be updated.


[in] Bitmask of flags used to indicate the RTF or plain text version of the message has changed. The following flags can be set:


The plain text version of the message has changed.


The RTF version of the message has changed.

All other bits in the ulFlags parameter are reserved for future use.


[out] Pointer to a variable indicating whether there is an updated message. TRUE if there is an updated message, FALSE otherwise.


The call succeeded and has returned the expected value or values.

If the PR_RTF_IN_SYNC (PidTagRtfInSync) property is missing or is FALSE, before reading the PR_RTF_COMPRESSED (PidTagRtfCompressed) property the RTFSync function should be called with the RTF_SYNC_BODY_CHANGED flag set.

If the STORE_RTF_OK flag is not set in the PR_STORE_SUPPORT_MASK (PidTagStoreSupportMask) property, this function should be called with the RTF_SYNC_RTF_CHANGED flag set after modifying PR_RTF_COMPRESSED.

If both PR_BODY (PidTagBody) and PR_RTF_COMPRESSED have been changed, the RTFSync function should be called with both flags set.

If the value of the lpfMessageUpdated parameter is set to TRUE, then the IMAPIProp::SaveChanges method should be called for the message. If SaveChanges is not called, the modifications will not be saved in the message.

Message store providers can use RTFSync to keep the PR_BODY and PR_RTF_COMPRESSED properties synchronized.

For more information, see Supporting RTF Text for Message Store Providers.

© 2015 Microsoft