Compartilhar via


TableOfContents.UpdatePageNumbers Method

Word Developer Reference

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.

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

See Also