addCrossReference

addCrossReference

BASIC / ADVANCED / PREMIUM

Inserts a cross-reference into the Word document.

Description
public void addCrossRefence(OptionsCrossReference options) throws Exception

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

Parameters

options

The options array includes the following keys and values:

Option Type Description
text String Text of the reference
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: