Macro of the Month – March 2023 – HyphenSpaceWordCount
Tells you how often a word pair is written as one word, two words, and hyphenated
last updated: 4/1/2024
One word, two words, hyphenated? How many times a day do you ask yourself this question? A single document can contain multiple variations of a single word. This month’s macro will help you bring consistency to the document. And a tip about reducing repetitive strain.
HyphenSpaceWordCount
When determining how to consistently spell a word pair, we consult dictionaries, style guides, and in-house guidelines. We also consider the author’s preferences. HyphenSpaceWordCount gives you additional data to consider by giving you an accounting of the various formats in use.
How it works: HyphenSpaceWordCount scans a document for various spellings of a word pair: one word, two words, hyphenated, and joined with a dash or a slash. The frequency numbers can help you determine which spelling to use, especially if one predominates.
How to use it: When you run across a hyphenated word that you think might be spelled inconsistently in the document, such as "mock-up" (or mock up/mockup), select it and run HyphenSpaceWordCount. For a low-strain way to select the word, click inside the first word (“mock") and shift-click in the second (“up”).
The macro gives you a pop-up window showing the frequency of the different forms: mockup, mock up, mock-up. (The screenshot is from a Mac; the results are the same on a PC):
If instead you select the single-word form, "mockup" in this example, the macro will guess where the break occurs, asking you to confirm. Make any needed correction in the pop-up window. Then select OK.
Next steps: Once you decide which spelling you want to use, you can change the other spellings using Word’s Find and Replace (and don't forget to add it to your style sheet). Be careful when globally changing the other spellings. For instance, in this example you wouldn’t want to change “mock up” if it is functioning as a verb.
Update: Read the April 2023 newsletter to learn how the macro now makes searching for the term easier.
Download the code: www.wordmacrotools.com/macros/H/HyphenSpaceWordCount
Tip – How macros reduce RSI
Paul has a new video (9 minutes) that explains how macros can help reduce the incidence of repetitive strain injury. What is especially useful is how he breaks down the level of strain from different gripping, clicking, and dragging movements.
How do you use macros to reduce RSI? Reply to this email and let me know.
Regards,
Jennifer