Written by Allen Wyatt (last updated May 21, 2026)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
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:
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.
Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2021 or Microsoft 365. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word Step by Step today!
The footnote separator, as its name implies, separates the footnotes on each page from the text on that page. If the ...
Discover MoreJumping to a specific footnote can be very handy if your document has a lot of footnotes in it. Word provides the ...
Discover MoreWant to get your footnotes from one place to another in a document, or even from one document to another document? It's ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2026 Sharon Parq Associates, Inc.
Comments