接受Word页眉,页脚和主要文档中的格式更改 [英] Accept Formatting Changes in Word Headers, Footers and Main Document
问题描述
我正在使用以下VBA代码接受文档中的所有格式更改.我还需要添加哪些行才能接受页眉和页脚中的更改?
I'm using the following VBA code to accept all formatting changes in a document. Which lines would I need to add in order to accept the changes in the Header and Footer as well?
ActiveDocument.ShowRevisions = True
ActiveDocument.ActiveWindow.View.ShowFormatChanges = True
ActiveDocument.ActiveWindow.View.ShowComments = False
ActiveDocument.ActiveWindow.View.ShowInsertionsAndDeletions = False
ActiveDocument.ActiveWindow.View.ShowInkAnnotations = False
ActiveDocument.AcceptAllRevisionsShown
ActiveDocument.ActiveWindow.View.ShowComments = True
ActiveDocument.ActiveWindow.View.ShowInsertionsAndDeletions = True
ActiveDocument.ActiveWindow.View.ShowFormatChanges = True
ActiveDocument.ActiveWindow.View.ShowInkAnnotations = True
推荐答案
选项1:
适用于所有Headers
,Footers
和Main Document
.
ActiveDocument.AcceptAllRevisions
选项2
这只会Accept
当前Document
可见部分中的修订.
This will only Accept
the revisions in the current viewable seciton of the Document
.:
ActiveDocument.Revisions.AcceptAll
您可以先添加以下内容:
What you can then Add before is something like:
'Opening the Header
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
如果要查看特定的修订,只需遍历各个wdSeek
选项以遍历各个部分.
Just run through the various wdSeek
Options to go through the various sections if you want to look at specific revisions.
您还可以使用Do
或For
Loop
在每个版本上运行脚本,
You can also run a script on each revision using a Do
or For
Loop
with:
ActiveDocument.Revisions.Item(x)
这篇关于接受Word页眉,页脚和主要文档中的格式更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!