答案1
宏似乎是更新所有目录并避免这些烦人消息的唯一方法。幸好有人已经编写了一个宏来执行此操作,可以在Microsoft 论坛。我已将其复制到此处,以防链接失效。
Sub UpdateDocument()
Dim oStory As Range
Dim oTOC As TableOfContents
Dim oTOF As TableOfFigures
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
For Each oTOC In ActiveDocument.TablesOfContents
oTOC.Update
Next oTOC
For Each oTOF In ActiveDocument.TablesOfFigures
oTOF.Update
Next oTOF
ActiveDocument.Save
End Sub