Macro of the Month – May 2025 – LongSentenceHighlighter
Highlights sentences over a certain length
Long, winding sentences can lose readers and obscure meaning. This month’s macro helps you spot overly complex sentences while you are editing so you can focus on refining them rather than locating them. Also, registration is open for the upcoming Word Macros A to Z class, with discounts available for EFA, IPEd, Editors Canada, CIEP, and PEG members. If you’ve been considering signing up, this is likely the only time the class will be held in 2025.
This Month’s Macro – LongSentenceHighlighter
Some authors are fond of writing long sentences, and while there’s nothing inherently wrong with complex prose, excessively long sentences can confuse readers and hinder clarity. LongSentenceHighlighter serves as a warning system, flagging sentences that may benefit from editorial attention.
How It Works
LongSentenceHighlighter is a document-analysis macro that you run before you start editing. This preflight macro highlights potential problem areas before you begin your detailed edit.
Run the macro on your working document before you begin editing.
The macro scans the entire document and highlights sentences based on length:
Medium-length sentences (50–69 words) are highlighted in yellow.
Mega-length sentences (70+ words) are highlighted in red.
As you edit, the highlighting draws your attention to potentially problematic sentences, helping you decide whether to break them up or restructure them for clarity.
Download the Code
Customize the Code
Opinions vary on how long is too long. You can adjust the macro to fit your style preferences or client requirements:
Open Visual Basic and locate the code for LongSentenceHighlighter.
To change the yellow highlight threshold (medium length):
Locate the line near the top that reads: mediumLength = 50
Replace “50” with your desired number
To change the red highlight threshold (mega length):
Locate the line near the top that reads: megaLength = 70
Replace “70” with your desired number
Managing the Highlighting
Remove individual highlights as you encounter them while editing by using HighlightOffNext, or use HighLightOff to remove all highlighting from your document when you’re finished editing. The removal of the highlighting will not be tracked with either macro.
Word Macros A to Z – Final class of 2025
Ready to master more macros like LongSentenceHighlighter? Over six weeks, the Word Macros A to Z course helps you build essential macro skills through video tutorials, hands-on exercises, and live Q&A sessions. The course is designed for both PC and Mac users, whether you are new to macros or looking to expand your skills. Click here for a detailed course description and outline.
“I enjoyed being able to work through the course at my own pace while still having regular access to the instructor. I was learning valuable things each week that I could employ at work right away.” —Past participant
Register here. Members of EFA, CIEP, IPEd, PEG, and Editors Canada qualify for discounted rates through their organizations.
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? Here’s a quick reminder: Open Visual Basic (Alt+F11 on PC, Option+F11 on Mac), select all the macro code (Ctrl+A/Cmd+A), copy it (Ctrl+C/Cmd+C), and paste it into a new Word document. Save the backup file with today’s date in the filename—your future self will thank you if your macros ever disappear.
I read this post just before starting to edit a paper from a client who tends to write long sentences, so I downloaded the macro and ran it. It highlighted the long sentences, making it easy to spot them. This week I also mastered CitationAlyse so I'm really on a macro roll. I highly recommend Jennifer's course in macros for anyone interested in more efficient editing.