modifyMergeFields

modifyMergeFields

ADVANCED / PREMIUM TRIAL

Modifies the values associated with Word template merge fields.

Description
public modifyMergeFields (array $data, [array $options])

This method allows to modify the value of a series of Word merge fields.

Parameters

data

An array with the names of the merge fields as keys and their corresponding values.

options

The possible keys and values of this array are:

Key Type Description
target string Possible values are: document (default), header, footer. This option sets the scope of the replacement procedure.
Exceptions

Method not available.

Code samples

Example #1

The resulting Word document looks like: