JavaScript API: replaceVariableExternalFile

replaceVariableExternalFile

PREMIUM TRIAL / ADVANCED

Replaces text variables with external files.

Note

You are reading the JavaScript API documentation. For the PHP API method please go to replaceVariableByExternalFile.

Description
replaceVariableExternalFile (variables: Map<string, WordFragment>, options: OptionsReplaceVariableExternalFile = {}): this

Only compatible with MS Word 2007 or newer.

Code samples

Example #1

The resulting Word document looks like:

Release notes
  • phpdocx 15.0:
    • new method.