VBA Code


Merges the changes marked with revision marks from one document to another.

Dim objDocument As Document 
objDocument.Merge(Name:=
                  MergeTarget:=wdMergeTarget.wdMergeTargetNew
                  DetectFormatChanges:=False
                  UseFormattingFrom:=wdUseFormattingFrom.wdFormattingFromCurrent
                  AddToRecentFiles:=False

MergeTarget -
DetectFormatChanges - Whether to detect formatting changes in the document.
UseFormattingFrom -
AddToRecentFiles - Whether to add to the recent files list.



Set objRange = ActiveDocument.Comments(1).Range 

ActiveDocument.AcceptAllRevisions 
ActiveDocument.Revisions.AcceptAll


Displaying the Comments Pane

By default, Word 2003 and Word 2002 do not include the Comment pane feature.

ActiveDocument.ActiveWindow.View.SplitSpecial = wdSpecialPane.wdPaneComments 


TrackRevisions Property

This property is True when tracked changes have been switched on in a document

ActiveDocument.TrackRevisions 

The following lines of code switch tracked changes on in the active document and display the Revisions on screen

ActiveDocument.TrackRevisions = True 
ActiveDocument.ShowRevisions = True


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrev