www.multilingual.ch - English translations & proofreading - WWW Search Interfaces for Translators
Macro for showing/hiding hidden text etc. in MS Word

 


The macro below works in MS Word 2002

 

Once you have installed the macro below, you will need to add a macro button in your toolbar or in your right-click menu to run the macro.

 

 

Macro for showing/hiding hidden text, spaces, tabs, paragraph marks etc. in MS Word

What the macro does

This macro saves a lot of time clicking and selecting options to show and hide hidden text, spaces, tabs, paragraph marks etc. in MS Word. By clicking once, you will show all hidden text etc.; by clicking again you will hide it.

This macro can be useful if you are using a translation memory program such as Trados Translator's Workbench, which makes use of hidden text (to mark the source language) as you may want to switch between "hidden text being shown" (to proofread your translation against the original text) and "hidden text being hidden" (to spellcheck your translation or to read through the entire translation without seeing the original text).

Note: If you run a spellcheck on your translation with all hidden text (source language text) showing, the spellcheck will stop at every source language term that is not in the target language dictionary, therefore it is important to hide the source text before launching a spellcheck.

 

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

**********cut here (do not include this line) **********

On Error GoTo MainStop
If ActiveWindow.View.ShowAll = False Or ActiveWindow.View.ShowHiddenText = False Then
With ActiveWindow
With .View
.ShowHiddenText = True
.ShowAll = True
End With
End With
Else
With ActiveWindow
With .View
.ShowHiddenText = False
.ShowAll = False
End With
End With
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro shows and hides all hidden text, spaces, tabs, paragraph marks etc. First you need to open a document..."
End If

**********cut here (do not include this line) **********

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macros dialog box will open. Type the name "ShowHide" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic – Normal – [New Macros (Code)]" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking.

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar or in your right-click menu to run the macro.

 

How to run the macro

Open a document containing hidden text. Click once on the macro button to perform one operation (show or hide) and again to perform the opposite.

 

Keywords: MS Word spellcheck macro MS Word spell-check macro MS Word macro

 

Print this page!

 

Back / Tools for Translators / Home / Site Map

http://www.multilingual.ch
Web design by Tanya Harvey Ciampi