TablesOfContents Collection Object
Word Developer Reference |
A collection of TableOfContents objects that represent the tables of contents in a document.
Remarks
Use the TablesOfContents property to return the TablesOfContents collection. The following example inserts a table of contents entry that references the selected text in the active document.
Visual Basic for Applications |
---|
|
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.
Visual Basic for Applications |
---|
|
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.
Visual Basic for Applications |
---|
|
See Also