Macro to force hidden text shown in Word

In order to show the hidden text in your Word document you need to turn on that Show Marks & Symbols button. But for those who don’t like this button turned on at all time, you need to use a few tricks in Word to force the hidden text shown without having to press that button.

The basic code in VBA that makes hidden text display is something like this:

ActiveWindow.View.ShowHiddenText = True

If you want the hidden text shown in a template, add the following codes in ThisDocument.

Private Sub Document_New()
    ActiveWindow.View.ShowHiddenText = True
End Sub

If you want the hidden text shown automatically in a particular document, change the subroutine name to Document_Open().

If you want the hidden text show automatically on any of new document, put the same code above into Normal.dot template on your local computer.

Check out here and here for more details but you don’t really have to. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *