In the following contents, we are dedicated to showing you 2 effective ways to print hidden texts in your Word document.
Most of the time, we hide texts to make them invisible as to protect sensitive information. But after a specific time range, the hidden texts need to be revealed to the public. For example, if you are a teacher giving test to students, you wouldn’t want the answers to be visible as well. So you hide them. However, in the same case, after a test is given, those hidden texts are in demand.
Here are 2 effective methods you can take to print hidden texts.
Method 1: Set Printing Option
- Firstly, click “File” tab in the Ribbon.
- Secondly, click “Options” to open the “Word Options” box.
- Next click the “Display” tab on the left column.
- On the right section, under “Printing options” part, check the “Print hidden text” box.
- Then click “OK”.
If you want hidden texts always on the screen, check “Hidden text” box under “Always show these formatting marks on the screen” part in step 4.
Method 2: Run Word Macro
With following instructions, you can print current document or choose one or more documents from a folder.
Create a User Form
- First and foremost, press “Alt+ F11” to invoke VBA editor.
- Then click “Normal” and then the “Insert” tab on menu bar.
- Next choose “UserForm” on drop-down menu. Resize the form properly.
- Press “F4” to open the “Properties Window” on the left-down corner.
- Click on the user form and name it as “frmPrintHiddenText” and set its caption as “Print Hidden Text”.
- Now click “Toolbox” command on menu bar to bring out the box.
- Choose command button on the box and create 3 of them and arrange them in following order:
- Next set properties for these buttons.
- First click on the first command button. In the “Properties Window”, name it as “btnPrintCurrentDocument” and set caption as “Print current document”.
- Then click on the second button, name it as “btnPrintMultiDocFromFolder” and set caption as “Print multiple documents from a folder”.
- Next click on the third button. Name it as “btnClose” and set caption as “Close”.
In addition, set other properties accordingly, such as font, background color, etc.
- Now double click on the “Print current document” button, and enter codes as below:
Private Sub btnPrintCurrentDocument_Click() Options.PrintHiddenText = True ActiveDocument.PrintOut End Sub
- Next double click on “Print multiple documents from a folder” button. Input codes there:
Private Sub btnPrintMultiDocFromFolder_Click() Dim objDoc As Document Dim dlgFile As FileDialog Dim nFile As Integer Set dlgFile = Application.FileDialog(msoFileDialogFilePicker) With dlgFile dlgFile.AllowMultiSelect = True If .Show = -1 Then For nFile = 1 To dlgFile.SelectedItems.Count Documents.Open dlgFile.SelectedItems(nFile) Set objDoc = ActiveDocument Options.PrintHiddenText = True ActiveDocument.PrintOut Next nFile Else MsgBox "No file is selected! Please select a target file." Exit Sub End If End With End Sub
- Similarly, double click on “Close” button and type codes:
Private Sub btnClose_Click() Unload Me End Sub
Insert a Module
- First, click “Insert” tab again and this time select “Module”.
- Open new module by double click.
- Next enter codes on the module:
Sub TriggerHiddenTextPrinting() frmPrintHiddenText.Show End Sub
- Rename the module as “ModTriggerHiddenTextPrinting”.
We suggest you assigning a button for the “TriggerHiddenTextPrinting” macro. For detailed steps, you can refer to this article: How to Remove the Formatting of Pasted Texts with Macro and VBA in Your Word
Click the macro button to trigger the user form. If you click “Print multiple documents from a folder”, you will have the “Browse” window open. Select target files.
How to Deal with Word Problem
Word is not immune to problems and issues. So you should make preparation while you can. For instance, it’s a good habit to back up files on a regular basis. Besides, it’s also advisable to obtain a tool for Word fix in case it fails.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix xls and pdf repair software products. For more information visit www.datanumen.com
Leave a Reply