replaceBlock

replaceBlock

ADVANCED / PREMIUM BASIC

Replaces all content between two block variables from the Word document.

Description
public replaceBlock (string $blockName, mixed $value [, array $type])
Parameters

blockName

The name of the block variable.

value

New content: string or WordFragment.

type

Replacement type: block (default) or inline.

Code samples

Example #1

The resulting Word document looks like:

Example #1

The resulting Word document looks like: