JSON API - addMergeField

addMergeField

PREMIUM TRIAL / ADVANCED

Inserts a merge field.

Note

You are reading the JSON API documentation. For the PHP API method please go to addMergeField.

JSON data

Styles from addText can be used.

Key Description
name The name of the corresponding mail merge field.
mappedField Sets to true if you want the merge field to be a mapped field.
preserveFormat If true (default value) preserves the original Word format.
textAfter Text to be included after the merge field.
textBefore Text to be included before the merge field.
verticalFormat If true (default value is false) uses a vertical format.
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.