As we edit further into a document, we may suspect that a word or phrase is being overused, misused, or inconsistently treated. This month’s macro will help you catch and evaluate all instances of such a term by highlighting them.
This Month’s Macro – HighlightSame
Have you ever encountered a term like “symbology” when the simpler “symbol” would better serve your readers? When coming across the second or third instance, you might begin to suspect that there will be many more occurrences you’ll need to assess and possibly change. The traditional approach—using Word’s Find/Replace box—requires you to pause your detailed line-by-line editing and evaluate each instance separately. This approach disrupts your concentration and forces you to reorient yourself to the text.
HighlightSame offers a more efficient solution by highlighting all instances of a term with just the press of a button. The highlighting makes each occurrence visible during your normal editing process, allowing you to evaluate each one during your line-by-line editing.
How It Works
To highlight a single word:
Place the cursor anywhere inside the word
Run HighlightSame to apply yellow highlighting to all instances of the word

To highlight a phrase or a portion of a word:
Select the entire phrase or portion of a word
Run HighlightSame to apply yellow highlighting to all instances

To use different color highlighting:
Select the entire term, phrase, or portion of a word
Run HighlightPlus repeatedly until it applies your desired color
Run HighlightSame to apply the highlighting to all instances

Key features of HighlightSame:
It applies highlighting without tracking
It highlights both uppercase and lowercase instances
It highlights partial words—for example, when highlighting “lead,” it will also highlight “lead” in “leadership” and “misleading”
Download the code
HighlightSame: www.wordmacrotools.com/macros/H/HighlightSame
HighlightPlus: www.wordmacrotools.com/macros/H/HighlightPlus
Customize the macro
If yellow highlighting isn’t your preference, you can easily change the default color in the macro code:
Choose your preferred highlighting color from these options:
Bright green = wdBrightGreen
Turquoise = wdTurquoise
Pink = wdPink
Red = wdRed
50% gray = wdGray50
25% gray = wdGray25
Locate the line near the top of the code that reads:
textColour = wdYellow
Replace “wdYellow” with the code for your chosen color. For example, to use turquoise highlighting:
textColour = wdTurquoise
That's it! Your macro will now highlight using your preferred color instead of yellow.
Tip
Remove individual highlights as you encounter them with HighlightOffNext, or use HighLightOff to remove all highlighting from your document. The removal of the highlighting will not be tracked with either macro.
Related Macros
HighlightWordList: Highlights predefined terms throughout a document to help you catch repetitive errors, like easily confused words, when you are in detailed editing mode
CountPhrase: Tells you how frequently a given term appears in a document; run this macro to help you decide if you want to run HighlightSame
Have a question or want to suggest a macro for a future newsletter? Reply to this email and let me know.
Happy macroing,
Jennifer
ps: Have you backed up your macros recently?
Oh! This promises to be an excellent macro! I can't wait to try it out. Thanks, Jennifer!