Getting Rid of Trailing Spaces in Footnotes and Endnotes

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


1

If Jessica wants to remove extra spaces at the end of a paragraph, she knows she can search for a space followed by ^p and replace it with ^p by itself. This, however, doesn't work for footnotes and endnotes, probably because Word doesn't allow you to "replace" end-of-paragraph markers in such notes. Jessica wonders if there is a way around this limitation so she can easily get rid of trailing spaces in footnotes and endnotes.

It is interesting to note that Word allows you to use Find and Replace to get rid of a trailing space in a paragraph in the body of the document, but it doesn't extend the same capability to footnotes and endnotes—at least not in all versions of Word.

For instance, if you have trailing spaces in both footnotes and endnotes in Word 2007, then Find and Replace works as Jessica experienced—the trailing spaces are unchanged. In Word 2010, Find and Replace gets rid of trailing spaces only in footnotes; it leaves endnotes unchanged. In Word 2013, the behavior is just as it was in Word 2007—spaces remain unchanged in both footnotes and endnotes. If you have Word 2016, then the trailing spaces are removed from both footnotes and endnotes, as they should be. In Word in Microsoft 365, an extra paragraph mark is added to each footnote, but not to endnotes. Quite inconsistent!

If you want to be sure to get rid of all the trailing spaces, there are two approaches you can use. The first is to follow these steps:

  1. Click once within the footnotes area. (It doesn't matter where; just somewhere in the area.)
  2. Press Ctrl+A. All the footnotes should now be selected.
  3. Press Ctrl+E. All of the footnotes are now centered, plus the trailing spaces are gone.
  4. Press Ctrl+L. All of the footnotes are now, once again, left justified.
  5. Repeat steps 1 through 4 for any endnotes in your document.

Of course, if your footnotes and endnotes are anything other than left justified, then the above steps will mess up that alignment. In such situations (and if you need to get rid of such spaces quite a bit), a macro presents a better approach. Here's a handy one that that will get rid of the trailing spaces in both footnotes and endnotes.

Sub FootEndnoteTrailingSpaces()
    Dim fn As Footnote
    Dim en As Endnote

    For Each fn In ActiveDocument.Footnotes
        If Right(fn.Range.Text, 1) = " " Then
            fn.Range.Select
            Selection.Collapse Direction:=wdCollapseEnd
            Selection.TypeBackspace
        End If
    Next fn
    For Each en In ActiveDocument.Endnotes
        If Right(en.Range.Text, 1) = " " Then
            en.Range.Select
            Selection.Collapse Direction:=wdCollapseEnd
            Selection.TypeBackspace
        End If
    Next en
End Sub

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 (4833) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021.

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

Using the COLUMN Function

Need to know the column number for use in a formula? The worksheet function you want is the COLUMN function, described in ...

Discover More

Resetting Excel Menus

Excel allows you to easily change what appears on its menus. If you later want to return to Excel's default menu ...

Discover More

Saving an Envelope for Future Use

It can take a while to get an envelope to appear just the way you need. Why throw your work away when you are done with ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Quick and Dirty Paragraph Count

Need to know how many paragraphs are in a document? You can use Word's Find and Replace feature to get a count quickly.

Discover More

Keeping a Replace Operation Displayed

The Find and Replace tool is designed to help you find and replace information as quickly as possible. However, you may ...

Discover More

Selectively Find and Replace Page Borders

Using Find and Replace you can both find and replace graphics in your document. Replacing graphics selectively is a bit ...

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 seven more than 1?

2024-01-20 11:39:57

Robert S Davis

I have Word 365. Between my endnotes 36 and 37 there is a large gap that I cannot close. When I clicked on the backward "P" (hidden format symbols) it shows, in front of note 37 and all notes after a tiny black square. I cannot delete the square. Please help. Robert S. Davis genws@hiwaay.net


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.