Add Method (TablesOfFigures Collection)

Applies To

TablesOfFigures collection object.

Description

Adds a table of figures to a document.

Syntax

expression.Add(Range, Caption, IncludeLabel, UseHeadingStyles,
ú UpperHeadingLevel, LowerHeadingLevel, UseFields, TableId,
ú RightAlignPageNumbers, IncludePageNumbers, AddedStyles)

expression Required. An expression that returns a TablesOfFigures object.

Range Required Range. The range where you want the table of figures to appear.

Caption Optional Variant. The label that identifies the items you want to include in the table of figures. Corresponds to the \c switch for a TOC (Table of Contents) field. If this argument is omitted, Caption is set to "Figure."

IncludeLabel Optional Variant. True to include the caption label and caption number in the table of figures. If this argument is omitted, IncludeLabel is set to True.

UseHeadingStyles Optional Variant. True to use built-in heading styles to create the table of figures. If this argument is omitted, UseHeadingStyles is set to False.

UpperHeadingLevel Optional Variant. The starting heading level for the table of figures, if UseHeadingStyles is set to True. Corresponds to the starting value used with the \o switch for a TOC (Table of Contents) field. The default value is 1.

LowerHeadingLevel Optional Variant. The ending heading level for the table of figures, if UseHeadingStyles is set to True. Corresponds to the ending value used with the \o switch for a TOC (Table of Contents) field. The default value is 9.

UseFields Optional Variant. True to use TC (Table of Contents Entry) fields to create the table of figures. Use the MarkEntry method to mark entries you want to include in the table of figures. If this argument is omitted, UseFields is set to False.

TableId Optional Variant. A one-letter identifier that's used to build a table of figures from TC (Table of Contents Entry) fields. Corresponds to the \f switch for a TOC (Table of Contents) field. For example, "i" builds a table of figures for an illustration.

RightAlignPageNumbers Optional Variant. True align page numbers with the right margin in the table of figures. If this argument is omitted, RightAlignPageNumbers is set to True.

IncludePageNumbers Optional Variant. True if page numbers are included in the table of figures. If this argument is omitted, IncludePageNumbers is set to True.

AddedStyles Optional Variant. The sting name for additional styles used to compile the table of figures (styles other than the Heading 1 – Heading 9 styles). Use the Add method to create new heading styles.

See Also

TablesOfFigures collection object.

Example

This example inserts a table of figures in the active document.

ActiveDocument.TablesOfFigures.Add Range:=Selection.Range