Class RevisionsFilter (Word VBA)
The class RevisionsFilter represents the current settings related to display of reviewers' comments and revision marks in the document. To use a RevisionsFilter class variable it first needs to be instantiated, for example
Dim rfr as RevisionsFilter
Set rfr = ActiveWindow.View.RevisionsFilter
Markup
Returns or sets a WdRevisionsMarkup constant that specifies the extent of reviewer markup displayed in the document. Possible return values are wdRevisionsMarkupAll - Displays the final document with all markup visible, wdRevisionsMarkupNone - Displays the final document with no markup visible, wdRevisionsMarkupSimple - Displays the final document in simple markup: with revisions incorporated, but with no markup visible.
Public Sub Markup_Example()
ActiveWindow.View.RevisionsFilter.Markup = wdRevisionsMarkupAll
End Sub
Reviewers
Returns a Reviewers object that represents the collection of reviewers of one or more documents.
The Reviewers collection returned by Reviewers contains the names of all reviewers who have reviewed documents opened or edited on a computer.
Public Sub Reviewers_Example()
Debug.Print ActiveWindow.View.RevisionsFilter.Reviewers.Count
End Sub
ToggleShowAllReviewers
Shows or hides all revisions in a document that contains comments and tracked changes.
In previous versions of Word, the ToggleShowAllReviewers method was on the Window object. As of Word, that method is hidden.
ActiveWindow.View.RevisionsFilter.ToggleShowAllReviewers
View
Sets or returns a WdRevisionsView constant that represents the global option that specifies whether Word displays the original version of a document or the final version, which might have revisions and formatting changes applied. Possible return values are wdRevisionsViewFinal - Displays the document with formatting and content changes applied, wdRevisionsViewOriginal - Displays the document before changes were made.
The RevisionsFilter.View property replaces the View.RevisionsView property that was in previous version of Word.
Sub RevisionsFilter_View_Example()
With ActiveWindow.View
If .RevisionsFilter.View = wdRevisionsViewFinal Then
.RevisionsFilter.View = wdRevisionsViewOriginal
Else
.RevisionsFilter.View = wdRevisionsViewFinal
End If
End With
End Sub