Finding Long Paragraphs

Written by Allen Wyatt (last updated November 29, 2025)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365


Part of Olivia's responsibility as an editor is to pay particular attention to paragraphs that have a large number of words, determining if they can be simplified. She wonders if there is a way to somehow "flag" paragraphs that contain more than, say, 125 words.

This is most easily done with a macro. Here's a very simple example that will do exactly what Olivia requests:

Sub CheckParagraphLength1()
    Dim p As Paragraph

    For Each p In ActiveDocument.Paragraphs
        With p.Range
            If .Words.Count > 125 Then .HighlightColorIndex = wdYellow
        End With
    Next p
End Sub

The macro steps through each paragraph in the document and, if it contains more than 125 words, highlights it in yellow. This will make it easy to locate the offending paragraphs.

If you want to change the threshold at which highlighting is done, then a more robust version of the macro is called for:

Sub CheckParagraphLength2()
    Dim p As Paragraph
    Dim sInput As String
    Dim lMaxWords As Long
    Dim iParCount As Integer

    Do
        sInput = InputBox( _
          Prompt:="Maximum number of words allowed in a paragraph:", _
          Title:="Paragraph Length Check")

        If sInput = "" Then Exit Sub

        If IsNumeric(sInput) Then
            lMaxWords = CLng(sInput)
            If lMaxWords >= 25 Then Exit Do
        End If
        MsgBox "Enter a value of 25 or greater.", vbExclamation, "Invalid Value"
    Loop

    iParCount = 0
    For Each p In ActiveDocument.Paragraphs
        With p.Range
            .HighlightColorIndex = wdNoHighlight
            If .Words.Count > lMaxWords Then
                .HighlightColorIndex = wdYellow
                iParCount = iParCount + 1
            End If
        End With
    Next p
    MsgBox iParCount & " paragraphs were highlighted.", vbInformation, "Finished"
End Sub

When this version is run, the user is asked to enter the number of words to be used as the threshold. The prompt will repeat until the user enters a value of at least 25 words. If the input field is left blank, then the macro is cancelled. When the macro is complete, the user is shown a message box that indicates how many paragraphs were highlighted.

Speaking of highlighting, it should be noted that either of these macros will mess up or remove any highlighting already in the document. If you use highlighting for a different purpose, then the macro would need to be changed to flag paragraphs in some other way, such as by adding some text at the beginning of the document.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10141) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Automatically Using Smart Quotes

As a way to make your documents look more professional, Word can utilize "smart quotes" for both quote marks and ...

Discover More

Using Drag-and-Drop to Create a Hyperlink

If you open workbooks in two instances of Excel, you can use drag-and-drop techniques to create hyperlinks from one ...

Discover More

Ctrl+V Pasting is Flakey

When you copy and paste a formula, you usually want to see the formula where you pasted. If you don't get the formula, ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!

More WordTips (ribbon)

Unknown Non-Printing Characters

When you paste information into Word from the internet, you may get more than just the plain text you hoped for. This tip ...

Discover More

Jumping to the End of the Document in Error

If you inadvertently move to the end of the document, you might be wondering how to get your insertion point back to ...

Discover More

Selecting a Word

Selecting text is a critical skill to possess when you want to work with a Word document. This tip explains how you can ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 + 1?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.