If you’re into writing, you’re probably interested in readability. To help you get a handle on sentence length, use the following Word macro to highlight long sentences.
Tools such as the Hemingway Editor are vital for any writer, especially those who create website content. After all, readability influences page rank in Google search results. In other words, if you’re concerned about SEO, you should be concerned about readability.
Yoast Readability Analysis
If you use the Yoast SEO plugin, expand the readability tab. There, you’ll see your Flesch score. If it’s yellow, say in the 50s, the plugin suggests that you use shorter sentences.
Well, you can paste your text into Hemingway. It will highlight sentences that are difficult to read. However, if you correct all the problems, Yoast might still deny you a green light.
So, the next step is to use shorter sentences. However, if you have a 2,000-word article, highlighting each sentence to do a word count can take a lot of time.
What you need is a software tool that will automatically flag long sentences. Unfortunately, most word processors and writing tools don’t have this capability.
That’s why you’ll probably have to use Microsoft Word.
What Doesn’t Work
Allen Wyatt posted a Word macro to highlight long sentences. However, it uses the “Words” property to count words.
The problem with using the “Words” property is that it counts punctuation and paragraphs as words.
In other words, the results of Wyatt’s macro are unreliable.
Don’t use Wyatt’s macro. OK?
Word Macro to Highlight Long Sentences
Microsoft has a useful knowledge base article that addresses the aforementioned problem. It’s called Word count appears inaccurate when you use the VBA “Words” property.
Essentially, rather than using the “Words” property, you have to use the “ComputeStatistics” method to get an accurate word count.
So, I went ahead and updated the macro to work with “ComputeStatistics” rather than “Words.”
Here it is:
Sub longSentences() Dim i As Integer Dim j As Integer i = ActiveDocument.Sentences.Count For j = 1 To i Set myRange = Documents(ActiveDocument).Sentences(j) wordCount = myRange.ComputeStatistics(Statistic:=wdStatisticWords) If wordCount >= 20 Then ActiveDocument.Sentences(j).HighlightColorIndex = wdBrightGreen Next End Sub
Just pop the above code into your MS Word and it will highlight sentences with 20 or more words. Of course, you can change the sentence length to whatever you want.
More readingLow-Tech Online Security Issues- Sometimes discussions about online security get way too complicated. Frenzied business owners worry about everything from phishing to ransomware. In… Continue ReadingWhat is Marketing? [Marketing Basics Part 01]- Most of the business owners I meet know that marketing is good. They also know that they should be involved… Continue Reading
NEW! Buy the e-book, “30 Ways to Get FREE Website Traffic in 30 Minutes or Less.” Our fast, secure checkout is powered by Square.