0

is there a line we could add to the following VBA routine in order to highlight one letter before and one letter after all deleted text, so that when all changes are accepted, we can still visualize where some text has been deleted? Here is the code I am talking about from a previous post:

There is the Revisions Object in VBA. From there it's simple to iterate through each revision item, accept and hightlight it with a predefined color.

Additionally we need to temporarly disable tracking.

Sub tracked_to_highlighted()           
    tempState = ActiveDocument.TrackRevisions
    ActiveDocument.TrackRevisions = False    
    For Each Change In ActiveDocument.Revisions        
        Set myRange = Change.Range
        myRange.Revisions.AcceptAll
        myRange.HighlightColorIndex = wdGreen            
    Next    
    ActiveDocument.TrackRevisions = tempState

End Sub
  • Don’t just say “(continued)” in your title. If you want to refer to a previous question, link to it. – Scott Oct 12 '18 at 18:31
  • I sure will next time! Thanks – MGF777 Oct 12 '18 at 18:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.