Sub AutoClose() Call UpdateRefTables End Sub
Sub UpdateRefTables() Dim TOC As TableOfContents ' Table of Contents Object Dim TOA As TableOfAuthorities ' Table of Authorities Object Dim TOF As TableOfFigures ' Table of Figures Object With ActiveDocument ' The following routines update TOC, TOA or TOF contents. ' Loop through Tables Of Contents and update For Each TOC In .TablesOfContents TOC.Update Next ' Loop through Tables Of Authorities and update For Each TOA In .TablesOfAuthorities TOA.Update Next ' Loop through Tables Of Figures and update For Each TOF In .TablesOfFigures TOF.Update Next End With End Sub