Update the Entire Table of Contents by Default in Word
Question details
Make updating the entire table of contents the convenient default action in Word.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- The user regularly refreshes a table of contents and wants to update headings as well as page numbers without changing the dialog selection each time.
- Observed behavior
- Word normally selects Update page numbers only in the update dialog and has no standard setting to change that default.
Make sure the document contains an automatic table of contents and that you can run VBA macros in your desktop version of Word. The menu instructions below apply to Word for Windows.
Use a Word macro to update the entire table of contents
Run a macro instead of the standard update command to refresh the first table of contents without the selection dialog.
This workaround does not change the dialog's default selection. It provides a separate command that updates the entire table directly.
In Word for Windows, press Alt+F8, enter UpdateFullTOC as the macro name, choose where to store it, and select Create.
In the VBA editor, place ActiveDocument.TablesOfContents(1).Update between the Sub and End Sub lines. Save the macro and close the editor.
Go to File > Options > Quick Access Toolbar. Under Choose commands from, select Macros, select UpdateFullTOC, click Add, and then click OK.
Open a document containing an automatic table of contents and click the new macro button on the Quick Access Toolbar.

Manage documents and tables of contents in WPS Writer
WPS Office is a free, lightweight alternative for working with Word documents in a familiar interface. Open compatible files in WPS Writer to continue editing with an easy transition from Microsoft Office; it does not change Word's update dialog.

Frequently Asked Questions
Can I change the default selection in Word's update dialog?
Word has no standard option to make Update entire table the default selection. A macro can bypass the dialog and update the entire table directly.
How do I update every table of contents in a document?
In the VBA editor, use a loop over ActiveDocument.TablesOfContents and call Update for each table: For Each toc In ActiveDocument.TablesOfContents: toc.Update: Next toc.
Can I assign the macro to a keyboard shortcut?
In Word for Windows, go to File > Options > Customize Ribbon, select Customize next to Keyboard shortcuts, and choose Macros to assign a shortcut.
Why does the macro fail when I run it?
Check that the active document contains an automatic table of contents and that your Word security settings allow the macro to run. The first-table command requires at least one table of contents.




