TableOfContents.UpdatePageNumbers Method (Word)

Updates the page numbers for items in the specified table of contents.

Syntax

expression .UpdatePageNumbers

expression Required. A variable that represents a TableOfContents collection.

Example

This example inserts a page break at the insertion point and then updates the page numbers for the first table of contents in the active document.

Selection.Collapse Direction:=wdCollapseStart 
Selection.InsertBreak Type:=wdPageBreak 
ActiveDocument.TablesOfContents(1).UpdatePageNumbers

See Also

Concepts

TableOfContents Object Members

TableOfContents Object