Skip to content

Hidden Text Printing options and workaround for Word

Hidden Text Printing in a Word document is possible but is more complex than it should be. Here’s how to change the setting quickly from the ribbon or change the print setting just for one print job.

By default, the hidden text will not be printed, but you can choose to print it if you want.

Print Hidden Text is a global Word Option that applies to all documents. Unfortunately, it’s not a document setting nor is it in the Print pane or Print dialog options as you’d expect.

Go to File | Options | Display. Then go down to the Printing Options area and tick or untick the “Print hidden text” box, depending on your preference.

See:  Hidden Text, Images and objects in Word

Hidden text positioning and formatting tricks in Word

Find and Remove Hidden Text in Word

Why an overall Word setting?

Why is this a global option for all Word documents rather than a choice set in each document, for example in the Print pane?  After all, printing hidden text is something you’re likely to turn on/off for individual documents or separate print jobs.

There’s no good answer except to say ‘History’.  Print Hidden Text is just one of many overall Word options that would make more sense at the document level.

The decision was made many years ago and it’s now deep in Word’s complex code.  Microsoft could fix this but there’s little financial reason to do it.

That makes it difficult, but not impossible to change the settings a document level or just for one print job.

Make Hidden Text visible

One choice we’ve already covered in Hiding in Styles is using a style with hidden text as an attribute.  Change the style to make the hidden text visible or not.

In many ways, that’s a better and more flexible option than using Print Hidden Text.

Print Hidden Text on the ribbon

Rather than dig down into Word Options, there is a way to change Print Hidden Text at the document level. It’s not pretty but possible.

Sadly, there’s no ribbon or Quick Access Toolbar option to Print Hidden Text

Instead dig into Word VBA then attach a short macro to a ribbon or QAT button.

Add the following code to the document.

Sub PrintHiddenTextToggle()

' Switches the Word global option Print Hidden Text

' MsgBox's can be commented out.

If Options.PrintHiddenText = True Then

    Options.PrintHiddenText = False

    MsgBox ("Print Hidden Text: OFF")

Else

    Options.PrintHiddenText = True

    MsgBox ("Print Hidden Text: ON")

End If

End Sub

Making the ribbon button change according to the setting is a whole different topic so we’ve kept it simple with a little message box to tell you the current setting. Comment the MSGBox lines out if you wish.

Print Hidden text – shorter version

The above code is deliberately simple with a full-form IF…Else.. structure.  It also allows for additional commands in the IF statement, which will be necessary, see below.

Several readers including David P. and Sam J.  pointed out the much shorter version that does the same job in two lines.

Sub PrintHiddenTextToggle()

' Switches the Word global option Print Hidden Text

' MsgBox can be commented out.

    Options.PrintHiddenText = Not Options.PrintHiddenText

    MsgBox ("Print Hidden Text: " & Options.PrintHiddenText)

End Sub

The   Not   reverses the current setting.  True becomes False or vice-versa.

In a MsgBox the setting Options.PrintHiddenText  will return True/False text.

However neither of these macros is enough, see ‘The Comments Catch‘ below.

Once you have the macro, attach it to the ribbon or Quick Access Toolbar.  Go to Customise Ribbon (or Customize Quick Access Toolbar).

Choose commands from: Macros

Add the macro to whichever ribbon tab you like.

Right-click on the new ribbon item then Rename and give the button a better name (instead of Project.Module….) and select an icon.

Now the button appears, as shown above.

Warning – applies to all open documents

Remember that these are overall Word settings, they’ll apply to all documents open at the time you make the change.

AND the Print Hidden Text option will remain on for all Word docs until it’s changed.

The Comments catch

If that seems too easy for Word and Office, you’d be right.  In Microsoft’s documentation is the gotcha if changing the Print Hidden Text setting via VBA.

“Setting the PrintHiddenText property to False automatically sets the PrintComments property to False.
However, setting the PrintHiddenText property to True has no effect on the setting of the PrintComments property.”

Here’s a different version of the macro which takes the PrintComments change into account.  It may or may not apply in your situation.

Sub PrintHiddenTextToggle()

' Switches the Word global option Print Hidden Text
' and warns /changes PrintComments setting as well.
' MsgBox's can be commented out.

If Options.PrintHiddenText = True Then

    Options.PrintHiddenText = False

    ' Options.PrintComments is automatically set to false!

    MsgBox ("Print Hidden Text & Comments: OFF")

Else

    Options.PrintHiddenText = True

    Options.PrintComments = True

    MsgBox ("Print Hidden Text & Comments: ON")

End If

End Sub

If you prefer PrintComments to always be OFF, change the line Options.PrintComments = True  to  = False .

Hidden text printing for one print job only

In case you’re wondering, there is no AutoPrint() macro to change settings automatically before or after a print job (we wish for AutoPrintBefore() and AutoPrintAfter() ).

You’d have to make your own custom print macro.  This is a very simple example.

PrintwithHiddenText macro changes the PrintHiddenText and linked PrintComments settings then opens the standard Print dialog.

When the Print dialog closes (after printing or it’s cancelled) the settings are changed again.

Again, keep in mind that these are Word global settings that apply to all print jobs.  The settings will apply if you run this macro then leave the Print dialog open while switching to print another Word document.  Granted, that it’s not likely, but worth keeping in mind.

Sub PrintwithHiddenText()

' Turns on the Word global option Print Hidden Text

' then opens the Print dialog

' and resets the Hidden Text option afterwards.


' MsgBox's can be commented out.


    Options.PrintHiddenText = True

    Options.PrintComments = True

    MsgBox ("Print Hidden Text & Comments: ON")

   

    ' open the Print dialog

    Dialogs(wdDialogFilePrint).Show

   

    Options.PrintHiddenText = False

    ' Options.PrintComments is automatically set to false but let's do it anyway

    Options.PrintComments = False

    MsgBox ("Print Hidden Text & Comments: OFF")


End Sub

Extra tip – turn on Print Hidden text automatically

Print Hidden Text is an overall Word setting which may or may not be set when you open the document.

To change a setting when a document is opened use the AutoOpen() special macro.  As the name suggests, a macro called AutoOpen() is always run when the document is opened.

Add this macro to force your document to always open with PrintHiddenText on (or change the True/False as you like).

Sub AutoOpen()

' ensure some settings are OK whenever document is opened.

' hidden text is usually printed for this document.

Options.PrintHiddenText = True

' PrintComments is set to False when PrintHiddenText is set OFF.

Options.PrintComments = False

End Sub

Again, keep in mind these a global Word setting which apply to all documents until changed.

To reset the settings, there’s an AutoClose() macro to run when the doc is closed.

Sub AutoClose()

' reset settings to our global preferences when document are closed
' hidden text is usually NOT printed

Options.PrintHiddenText = False

' PrintComments

Options.PrintComments = False

End Sub

See:  Hidden Text, Images and objects in Word

Hidden text positioning and formatting tricks in Word

Find and Remove Hidden Text in Word

Show Hidden Characters in Word with Show All

About the image showing your hidden info

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.