Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The page WW8:WordTemplate in depth could not be found.

To insert an rtf document in a merge field use the "document(rtf)" modifier:

  1. Create or open a WordWriter template (for instructions, see Creating a WordWriter Template).
  2. Add the "document(rtf)" modifier in parentheses to the merge field in which you want to insert the rtf document. For example, change «Product.Doc» to «Product.Doc(document(rtf))»


When inserting an rtf document, the document must go at the same level as the paragraphs, this means that if the merge field is in the middle of a paragraph:

Some Text Before «Product.Doc(document(rtf))» Some text after

It will become:

Some Text Before
My sweet rtf document
has some content
Some text after

As a special case, if you don't have any content on either side:


It will become:

My sweet rtf document
has some content

Having only text before or only text after, will result in a blank paragraph on the other side, such as:

Some Text Before «Product.Doc(document(rtf))»

Will become:

Some Text Before
My sweet rtf document
has some content


Rtf documents maintain their own formatting, so if there is some bold text, or a right-aligned paragraph in the rtf document it will maintain that formatting. This includes the default font for the document, which may not match the default font of the template.


Because WordTemplate does not parse the contents of the rtf document, rtf fields in the comparison portion of if fields is not supported, when UpdateIfFields is set to true.
Because inserting an rtf document is not the same as inserting a character run some formatting and document structures do not support rtf fields:

  • Having mixed direction (left-to-right versus left-to-right) text in the paragraph containing the rtf field may, in some cases, not be allowed. This can be avoided by putting the rtf field in its own paragraph.
  • The cached output of another field cannot have rtf fields, however if it is in the field codes it will be handled like other fields.
  • Hyperlinks cannot span multiple paragraphs, and subsequently cannot have rtf documents
  • Rtf fields cannot go in either part of a phonetic guide, because those also do not support multiple paragraphs.
  • Structured document tags cannot have rtf fields (these are the items created when quick parts inserted, and have the little tab, e.g. "Title").
  • Tracked changes (insertions,deletions,moves) are sometimes stored in such a way that prohibits rtf documents. Accepting or rejecting any changes that encompass rtf fields will ensure that this is not a problem.
  • No labels