Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

Is it possible to suppress the appearance of the "Update Table of Contents" when I update the table of contents in MS Word (by positioning the cursor on it ad pressing F9)?

(I always want to "Update entire table", so why asking for it?)

share|improve this question

marked as duplicate by Nifle, mdpc, DavidPostill, Excellll, Raystafarian Apr 15 at 16:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 1 down vote accepted

This web site says it's impossible.  This one is more ambitious, and suggests that you define the following VBA function:

Sub UpdateTableOfContents()
    Dim oStory As Range
    Dim toc As TableOfContents
    Dim tof As TableOfFigures
    On Error Resume Next

    For Each oStory In ActiveDocument.StoryRanges
        Do
            oStory.Fields.Update
            Set oStory = oStory.NextStoryRange
        Loop Until oStory Is Nothing
    Next

    For Each toc In ActiveDocument.TablesOfContents
        toc.Update
    Next

    For Each tof In ActiveDocument.TablesOfFigures
        tof.Update
    Next
End Sub

and map it to a toolbar button and/or keyboard shortcut.  Disclaimer: I did not write this code, and I do not vouch for it in any way.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.