Kyra routinely uses footnotes and endnotes in the documents on which she works. She has noticed that, at times, there is a space just before the note mark within the main document. Kyra deletes them when she sees them, but she wonders if this is something she can do throughout the entire document, in a single pass.
The short answer is yes; you can. In fact, there are a couple of ways you can approach this task. The first is to use Find and Replace, in this manner:

Figure 1. The Replace tab of the Find and Replace dialog box.
The pattern you use in step 4 is very important. You are telling Word you want to search for any number of spaces followed by a note mark. (That's the ^2 portion of the pattern.) Since the note mark indicator is contained within parentheses, it can be referenced in the Replace With box (step 5).
If you think that there might be tab characters or non-breaking spaces before your note marks, then change the Find What pattern (step 4) to the following:
[ ^s^t]@(^2)
This finds any number of spaces, non-breaking spaces, and tabs—in any combination or order—followed by a note mark. (Note that the opening bracket is followed by a space.)
There is one potential drawback to this approach—it affects note marks in all areas of the document, including the footnotes and endnotes themselves. In most instances this isn't an issue, but Kyra implied that she wanted to only make changes in the main document. If this is the case, then you won't want to click Replace All in step 6. Instead, you'll want to step through the potential changes and only make those that you desire.
If you truly want to affect only the note marks in the main document, then the best way to do that is by using a macro. Here is an approach that relies on a main macro and a helper macro:
Sub RemoveNoteSpaces()
Dim J As Long
With ActiveDocument
For J = .Footnotes.Count To 1 Step -1
If .Footnotes(J).Reference.StoryType = wdMainTextStory Then
RemoveSpacesBeforeNote .Footnotes(J).Reference
End If
Next J
For J = .Endnotes.Count To 1 Step -1
If .Endnotes(J).Reference.StoryType = wdMainTextStory Then
RemoveSpacesBeforeNote .Endnotes(J).Reference
End If
Next J
End With
End Sub
Private Sub RemoveSpacesBeforeNote(ByVal noteRef As Range)
Dim startPos As Long
Dim notePos As Long
Dim ch As String
notePos = noteRef.Start
startPos = notePos
' Work backward from the note reference
Do While startPos > ActiveDocument.Content.Start
ch = noteRef.Document.Range(Start:=startPos - 1, End:=startPos).Text
If ch = " " Or ch = ChrW(160) Or ch = vbTab Then
startPos = startPos - 1
Else
Exit Do
End If
Loop
' Delete unwanted characters
If startPos < notePos Then
noteRef.Document.Range(Start:=startPos, End:=notePos).Delete
End If
End Sub
In the main macro (RemoveNoteSpaces), processing is done from the end of the footnote and endnote collections. This approach within a macro is always a good idea when you are deleting document text. If the footnote or endnote is within the main document (meaning the StoryType is wdMainTextStory), then the helper macro is called.
The helper macro (RemoveSpacesBeforeNote) simply examines characters before the note marker. If the characters are spaces, non-breaking spaces, or tab characters, then they are deleted.
The macro runs very quickly. And, because the main macro only works within the main document, nothing within the footnotes or endnotes themselves are affected.
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 (14000) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2019. Spend more time working and less time trying to figure it all out! Check out Word 2019 For Dummies today!
Need to make a cross-reference from one footnote to another footnote? You can do it if you throw bookmarks into the mix, ...
Discover MoreWhen you add footnotes to a document, Word separates those footnotes from the document body with a separator line. Here's ...
Discover MoreWord is very flexible when it comes to adding footnotes to your document. If you have multiple sections within that ...
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