TableOfContents Object

Multiple objects

Represents a single table of contents in a document. The TableOfContents object is a member of the TablesOfContents collection. The TablesOfContents collection includes all the tables of contents in a document.

Using the TableOfCContents Object

Use TablesOfContents(index), where index is the index number, to return a single TableOfContents object. The index number represents the position of the table of contents in the document. The following example updates the page numbers of the items in the first table of figures in the active document.


Use the Add method to add a table of contents to a document. The following example adds a table of contents at the beginning of the active document. The example builds the table of contents from all paragraphs styled as either Heading 1, Heading 2, or Heading 3.

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfContents.Add Range:=myRange, _
    UseFields:=False, UseHeadingStyles:=True, _
    LowerHeadingLevel:=3, _

Properties | Application Property | Creator Property | HeadingStyles Property | HidePageNumbersInWeb Property | IncludePageNumbers Property | LowerHeadingLevel Property | Parent Property | Range Property | RightAlignPageNumbers Property | TabLeader Property | TableID Property | UpperHeadingLevel Property | UseFields Property | UseHeadingStyles Property | UseHyperlinks Property

Methods | Delete Method | Update Method | UpdatePageNumbers Method

Parent Objects

Child Objects | HeadingStyles Object | Range Object

See Also | TableOfFigures Object