Page tree
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 7 Next »

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))»

Paragraphs

When inserting an rtf document, the document must go at the same level as the paragraphs, to align the template file with the output, rtf documents should be put in their own paragraph:

It will become:

If there is content on both sides, paragraph breaks will be inserted on either side of the rtf document:

Will become:

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

Will become:

Formatting

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.

Restrictions

Like regular merge fields rtf fields can be in an if fields optional text to display, but, because WordTemplate does not parse the contents of the rtf document, rtf fields in the comparison portion of if fields are 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:

  • The displayed output of another field, however if it is in the field codes it will be handled like other fields.
  • Hyperlinks
  • Phonetic guides
  • Structured document tags (these are the items created when quick parts inserted, and have the little tab, e.g. "Title").
  • No labels