Macro of the Month – January 2024 – HighlightWordList
Highlights a list of words in a document to draw your attention as you are editing
last updated: 12/20/2024
Hello and welcome to the new home of Macro of the Month. The newsletter and archive of past editions are now being hosted at Substack. Please update your email filters for the new email address: macroofthemonth@substack.com.
This month’s macro helps you identify terms that may need to be edited by highlighting them in the document. Also, there are only a few days left to register for the next six-week Macros A to Z course—details at the end of the newsletter.
HighlightWordList
Editing includes removing jargon, correcting easily confused words, ensuring unbiased language, and adhering to a client’s preferred spellings. All these tasks and more can translate into many words and phrases that you need to keep in mind when editing. To simplify the process, use HighlightWordList to highlight the terms in the document. When you highlight them, you don’t have to remember to look for them—they will jump out at you as you are editing. Thanks to Alice Franek for suggesting this macro for the newsletter.
How it works: Before you begin editing, run HighlightWordList on the entire document. It will highlight every occurrence of a word on your word list. The macro isn’t preloaded with any words or phrases; so you will need to create a list of words you want it to highlight —more on that below.
How to use it: Before you run HighlightWordList, you need to create a list of words for it to highlight. The below steps walk you through how to set up your list and incorporate the macro into your workflow.
1. Create a word list: Open a blank Word document and list all the words and phrases you want the macro to highlight. Apply highlighting to each element. Important: The file name must contain the word “list” and the file must be open when you run the macro.
2. Run HighlightWordList: Run the macro before you begin editing as one of your preflight steps. Place the cursor inside your working document. Run the macro. Follow the prompts in the pop-up window to confirm which document is the word list. The highlighting will not be tracked, even if you have Track Changes turned on.
3. Edit the document as usual: The macro allows you to focus more deeply on the text because it has flagged potentially problematic terms for you. When you encounter a highlighted word, review it and make any necessary changes.
4. Build up your word list gradually: You can develop a robust master word list over time. Whenever you come across new terms that need to be reviewed, add them to your list. The macro doesn’t care if a term appears on your list but is absent in the working document. Place any project-specific terms that you don’t want to permanently keep in the list at the top for easy deletion at the end of the project.
Download the code: www.wordmacrotools.com/macros/H/HighlightWordList
Customize the code (optional): You can adjust the default settings in the code for:
1. Case sensitivity: The macro is case-sensitive. Therefore, in the above example, the macro would not highlight capitalized forms of “Choose”, or any of the other words. To make the macro case insensitive, change True to False in the fifth line of the code:
doMatchCase = True
Or you can add both lowercase and uppercase versions of a word to your word list.
2. Partial words versus whole words: The macro will highlight a portion of a word. For example, if your list contains “lead,” the macro will highlight “lead” inside longer words like “leader.” If you want the macro to highlight whole words only (e.g., highlight “lead” but not l-e-a-d in “leader”), change False to True in the fourth line of the code:
doWholeWordsOnly = False
Related macros: You can use a macro to remove the highlighting as well. If you want to remove it one word at a time, use HighlightOffNext (it is set to not track the removal of the highlighting). If you want to remove the highlight globally at the end of a project, use HiLightOffALL (turn off tracking before you run it).
For FRedit users, you can use FRedit to highlight words and phrases for you. Place the term on both sides of the vertical bar and apply the highlighting to the entire line. I also recommend not tracking the change (since you aren’t changing the word, just highlighting it) by striking through the entire line. Here is how you would format the FRedit list entries for the example scenario:
If you are curious about this feature of FRedit and what else it can do, download the free FRedit from Square One self-training guide (Word document) that Paul Beverley and I developed.
Word Macros A to Z course – Registration closes in a few days
Have you been interested in learning macros but haven’t taken the leap yet? Or do you use a few macros and want to delve deeper? Whether you're a beginner or have some experience, the six-week Word Macros A to Z course will teach you how to optimize your productivity using macros. Through video tutorials, practical exercises, a vibrant discussion forum, and three Q&A sessions, you’ll explore the full potential of macros. The course is centered around Paul Beverley’s library of macros—so no programming is required. It is designed for both PC and Mac users.
Here is what some past attendees have said about the course:
I've picked up so many useful tools. The course was so well-organized, the handouts and videos were clear and helpful.
I really enjoyed how clear the content was—especially given that I knew nothing about Paul Beverley's macros to begin with.
I enjoyed being able to work through the course at my own pace while still having regular access to the instructor to ask questions. I liked that the instructor was very engaged in the discussion forum. I also really liked how each module began with an outline of options based on how much time I had available that week.
Register here. Members of CIEP, IPEd, PEG, and Editors Canada are eligible for a discounted rate; check with your editing organization for details.
Have a question or want to suggest a macro for a future newsletter? Comment on this post.
Happy macroing,
Jennifer