addCrossReference

addCrossReference

BASIC / ADVANCED / PREMIUM

Inserts a cross-reference into the Word document.

Description
public addCrossReference (string $text, [array $options = array()] )

This method allows the insertion of cross-references into a Word document.

Parameters
Key Type Description
text string Text of the reference

options

The options array includes the following keys and values:

Key Type Description
type string The bookmark type. Possible values are 'bookmark' and 'heading'.
referenceName string The name of the element to be referred.

Other styles from addText can also be used.

Code samples

Example #1

The resulting Word document looks like: