TablesOfFigures.Add Method
Word Developer Reference |
Returns a TableOfFigures object that represents a table of figures added to a document.
Syntax
expression.Add(Range, Caption, IncludeLabel, UseHeadingStyles, UpperHeadingLevel, LowerHeadingLevel, UseFields, TableID, RightAlignPageNumbers, IncludePageNumbers, AddedStyles, UseHyperlinks, HidePageNumbersInWeb)
expression Required. A variable that represents a TablesOfFigures collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Range | Required | Range object | 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 Table of Contents (TOC) field. The default value is "Figure." |
IncludeLabel | Optional | Variant | True to include the caption label and caption number in the table of figures. The default value is True. |
UseHeadingStyles | Optional | Variant | True to use built-in heading styles to create the table of figures. The default value is 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 Table of Contents (TOC) 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 Table of Contents (TOC) field. The default value is 9. |
UseFields | Optional | Variant | True to use Table of Contents Entry (TC) fields to create the table of figures. Use the MarkEntry method to mark entries you want to include in the table of figures. The default value is False. |
TableID | Optional | Variant | A one-letter identifier that's used to build a table of figures from Table of Contents Entry (TC) fields. Corresponds to the \f switch for a Table of Contents (TOC) 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. The default value is True. |
IncludePageNumbers | Optional | Variant | True if page numbers are included in the table of figures. The default value is True. |
AddedStyles | Optional | Variant | The string name for additional styles used to compile the table of figures (styles other than the Heading 1 – Heading 9 styles). |
UseHyperlinks | Optional | Variant | True if entries in a table of figures should be formatted as hyperlinks when publishing to the Web. The default value is True. |
HidePageNumbersInWeb | Optional | Variant | True if page numbers in a table of figures should be hidden when publishing to the Web. The default value is True. |
Return Value
TableOfFigures
Example
This example inserts a table of figures in the active document.
Visual Basic for Applications |
---|
|
See Also