When you do a grammar check on your document, the very last step performed by Word is to display a set of readability statistics that you can use to analyze the presentation of your content. There may be times when you want to only display the readability statistics, without going through the complete grammar check first. Unfortunately, Word does not provide a way to do this. You can, however, create a macro that will display the readability statistics quite nicely. The heart of such a macro would be the ReadabilityStatistics collection.
To get an idea how such a macro could be written, consider the following single-line macro:
Sub CheckTest() MsgBox ActiveDocument.Content.ReadabilityStatistics(9).Value End Sub
This macro displays a number that represents the Flesch Reading Ease value, ninth member of the ReadabilityStatistics collection. There are 10 individual elements in the collection, as follows:
Index | Meaning | |
---|---|---|
1 | Words | |
2 | Characters | |
3 | Paragraphs | |
4 | Sentences | |
5 | Sentences per Paragraph | |
6 | Words per Sentence | |
7 | Characters per Word | |
8 | Passive Sentences | |
9 | Flesch Reading Ease | |
10 | Flesch-Kincaid Grade Level |
To display all ten statistics (as would be done in a complete grammar check of your document), all you need to do is have your macro step through the various members of the collection and display their values. The following macro does just that:
Sub Readability() Dim DocStats As String Dim MBTitle As String Dim J As Integer MBTitle = "Readability Statistics" DocStats = "" With ActiveDocument.Content For J = 1 to 10 DocStats = DocStats & .ReadabilityStatistics(J) DocStats = DocStats & ": " DocStats = DocStats & .ReadabilityStatistics(J).Value DocStats = DocStats & vbCrLf Next J End With MsgBox DocStats, vbOKOnly, MBTitle End Sub
When you run the macro, understand that it takes a bit of time to run. In fact, depending on the speed of your system, the length of your document, and its complexity, it can take quite a bit of time to run. Be patient; once the ten statistics are completed, they are displayed on the screen.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10666) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Only Showing Readability Statistics.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
While you are typing in a document, Word is typically busy checking what you type for errors. If an error is found, Word ...
Discover MoreAre you bothered by the green underlines that Word uses to mark potential grammar errors in your document? You can hide ...
Discover MoreSome people feel that your writing can be better if you remove gender-specific language it may contain. Here's how you ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-02-17 22:26:36
AB
Just letting you know that the ndex order has changed in Word 2016. Changes are:
8 = Flesch Reading Ease
9 = Flesch-Kincaid Grade Level
10 = Passive Sentences
2018-07-22 21:25:37
Stella
Hi Allan, I have the same problem as Daniel, the passive sentence count always shows up as 0. If you could help with this, would be very grateful.
2018-02-25 19:26:14
Daniel
Hiya,
This macro doesn't work for (breaks?) the passive voice stat. Any suggestions?
2018-01-08 20:14:48
Susan Uttendorfsky, Adirondack Editing
Yes! Sometimes I need to see this in the middle of an edit and didn't know how to get access to it (other than running a spell check). Again, thank you! :)
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments