addIndex

addIndex

ADVANCED / PREMIUM TRIAL

Inserts an Index into the Word document.

Description
public addIndex ( [array $options [, array $legend]] )

This method allows to include an Index in the Word document.

Parameters

options

The possible keys and values are:

Key Type Description
autoUpdate boolean If true it will try to update the content when first opened.
columns int Default as 2.
langCode string Default as 1033 (English - United States).
style string Custom paragraph style to be applied.
type string
  • indented (default)
  • run-in

legend

The possible keys and values are:

Key Type Description
text array The placeholder text that will be shown if the autoupdate option is not activated.
Styles from addText.
Exceptions

Method not available.

Code samples

Example #1

Release notes
  • phpdocx 17.0:
    • new method.