Share via

ActiveWindow.View.RevisionsFilter broken recentl?

phs3 1 Reputation point
2021-04-23T20:50:15.44+00:00

I've had this macro forever:

Sub ToggleReView()
'
' ToggleReView Macro
'
'
ActiveDocument.TrackRevisions = True
With ActiveWindow.View.RevisionsFilter
If (.Markup = wdRevisionsMarkupSimple) Then
.Markup = wdRevisionsMarkupAll
Else
.Markup = wdRevisionsMarkupSimple
End If
End With
End Sub

Suddenly, this fails on the With line with error 91, "Object variable or With block variable not set".

Word for Microsoft 365 MSO (16.0.13901.20366) 64-bit
aka
Version 2103 (Build 13901.20400 Click-to-Run)

I've rebooted, and verified that the macro still works on two other machines.

Ideas?

Developer technologies | Visual Basic for Applications
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.