Finding Footnotes without Final Punctuation Marks

Written by Allen Wyatt (last updated May 23, 2026)

1

Randy has a document that has quite a few footnotes. He needs to locate all the footnotes that don't end with a period, question mark, exclamation mark, or quote mark. He knows how to use Find and Replace within footnotes, but he doesn't know if Find and Replace can be used for this need.

For this type of task, Find and Replace is not the best choice. It is better to use a macro to examine each footnote and highlight those that don't fit what Randy expects. Here is an example of such a macro:

Sub FlagFootnotes()
    Dim fn As Footnote
    Dim s As String
    Dim lastChar As String

    For Each fn In ActiveDocument.Footnotes
        s = fn.Range.Text

        ' Remove footnote end marker
        s = Left(s, Len(s) - 1)

        ' Strip trailing spaces, tabs, NBSPs, paragraph marks
        Do While Len(s) > 0
            Select Case AscW(Right(s, 1))
                Case 32, _      ' space
                     9, _       ' tab
                     160, _     ' nonbreaking space
                     13, _      ' paragraph mark
                     11         ' manual line break
                    s = Left(s, Len(s) - 1)
                Case Else
                    Exit Do
            End Select
        Loop

        If Len(s) > 0 Then
            lastChar = Right(s, 1)
            Select Case lastChar
                Case ".", "?", "!", """", ChrW(8221)
                    ' OK
                Case Else
                    fn.Range.HighlightColorIndex = wdYellow
            End Select
        End If
    Next fn
End Sub

The macro steps through each footnote and assigns the text of the footnote to the s variable. It then does two things with that text. First, it strips any trailing whitespace, and then it checks to see what the last character is. If it is anything other than what Randy wanted, then the text of the footnote is highlighted in yellow.

Once the macro has been run, Randy simply needs to look through the document for any highlighted footnotes. Those are the ones that need some attention relative to the final character.

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 (565) 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

Mimicking Small Caps in Excel

Word provides a much wider range of formatting tools and options than you can find in Excel. One example is when it comes ...

Discover More

Extracting URLs from Hyperlinks

When you add a hyperlink to a worksheet, it consists of a minimum of two parts: display text and URL address. If you have ...

Discover More

Two Keys with the Press of One

Sometimes it could be helpful to have Word substitute two characters for the one that you type, for instance, to replace ...

Discover More

Do More in Less Time! An easy-to-understand guide to the more advanced features available in the Microsoft 365 version of Word. Enhance the quality of your documents and boost productivity in any field with this in-depth resource. Complete your Word-related tasks more efficiently as you unlock lesser-known tools and learn to quickly access the features you need. Check out Microsoft 365 Word For Professionals For Dummies today!

More WordTips (ribbon)

Automatically Applying Custom Styles to Footnotes

Word is great in that it allows you to create styles that define how you want your text to appear. If you spend a great ...

Discover More

Jumping to a Relative Footnote

Footnotes can be a great addition to any document that needs detailed referencing of citations. You can navigate from one ...

Discover More

Jumping to a Footnote

Jumping to a specific footnote can be very handy if your document has a lot of footnotes in it. Word provides the ...

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 + 4?

2026-05-24 11:29:32

Michael (Micky) Avidan

You can, absolutely, perform your task directly from Word’s “Find and Replace” dialog box, especially if you have no previous experience with VBA Macro codes.
To do so, you'll need to use the powerful "Wildcard" feature.
To find text only within footnotes, there is a little trick to limit the search to that area.

Here are the steps:

1. Set up the search with wildcards
Open the "Find and Replace" dialog box by pressing Ctrl + H.
Click the "More >>" button to expand the options at the bottom of the dialog box > check the "Use wildcards" box.

In the "Find what" field, copy and paste the following string exactly as it is (incl. the [square brackets]:

[!.\?\!"'”]^f

2. Limit the search to footnotes only !
To ensure "Word" searches only within the footnotes and not the main text of the document:
Click inside one of the footnotes, at the bottom of the page, (so the cursor “knows” it’s in the footnote area).

Return to the "Find and Replace" pane (which is already set up from Step 1).
Click the “Find Next” button.
"Word" will start going through the notes one by one, stopping only at those where the last character, before the note number, is not one of the punctuation marks you defined.
You can manually correct the punctuation in each note it finds and continue by clicking "Find Next."

--------------------------------------------------
Michael (Micky) Avidan
”MVP – Excel (2009-2026)
ISRAEL


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.