Document.AcceptAllRevisionsShown Method (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Accepts all revisions in the specified document that are displayed on the screen.

expression .AcceptAllRevisionsShown

expression Required. A variable that represents a Document object.

Use the RejectAllRevisionsShown method to reject all revisions in a specified document that are displayed on the screen.

This example accepts all revisions displayed after hiding revisions made by "Jeff Smith." This example assumes that the active document was reviewed by more than one person and that the name of one of the reviewers is "Jeff Smith."

Sub AcceptAllChanges() 
 Dim rev As Reviewer 
 With ActiveWindow.View 
 'Display all comments and revisions 
 .ShowRevisionsAndComments = True 
 .ShowFormatChanges = True 
 .ShowInsertionsAndDeletions = True 
 For Each rev In .Reviewers 
 rev.Visible = True 
 'Hide only the revisions/comments made by the 
 'reviewer named "Jeff Smith" 
 .Reviewers(Index:="Jeff Smith").Visible = False 
 End With 
 'Accept all revisions displayed in the active view 
End Sub