Getting Rid of Extra Spaces at the End of a Footnote

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


When Thomas is working with documents created by other people, one of the steps he goes through is to delete any spaces that occur just before a hard return. He can use Find and Replace to do this, and thereby get rid of any extra spaces at the end of a paragraph. However, if the extra spaces are at the end of a footnote, Word doesn't really get rid of the spaces. Instead, it replaces the hard return at the end of the footnote with an extra hard return, so Thomas ends up with hard return, space, hard return. He wonders how he can properly get rid of extra spaces at the end of footnotes.

This seems to be a relatively new quirk in Word, and it can be quite frustrating for those who deal with footnotes quite a bit. (It isn't clear which version of Word this behavior cropped up in, but it is definitely there in Microsoft 365.) One possibility is to convert your footnotes to endnotes, then do the deletion, then convert the endnotes back to footnotes. This approach works because Word doesn't exhibit the same quirk with endnotes as it does with footnotes. (Go figure!)

A better approach, however, may be to use a macro to do the space removal. This is an especially good way to go if you need to work with footnote-laden documents often. Here's a very simple macro that may work for you:

Sub RemoveFS()
    ' Removes spaces from the end of paragraphs within footnotes
    Dim f As Footnote

    For Each f In ActiveDocument.Footnotes
        If Right(f.Range.Text, 1) = " " Then
            f.Range.Text = Left(f.Range.Text, Len(f.Range.Text) - 1)
        End If
    Next f
End Sub

Note that the macro checks each footnote to see if it ends in a space. If it does, then it removes that space by simply setting the .Text property for the footnote to drop that last character.

There is a problem with this macro, however. If your footnotes contain formatted characters (bold, italic, etc.), then that formatting is removed. When it comes to footnotes, which are often used for citations to books and articles, this can be a deal breaker. In that case, a better approach is the one used in this macro:

Sub RemoveFS()
    ' Removes spaces from the end of paragraphs within footnotes
    Dim f As Footnote

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

This macro still checks to see if the footnote ends in a space, but if it does, it selects the footnote, collapses the insertion point to the end of the footnote, and then types a backspace character. Any character formatting within the footnote is left undisturbed.

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 (629) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 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

Quickly Filling a Column

Excel has a great (and little known) shortcut for filling a column with information. It comes in very handy when you need ...

Discover More

Using Check Boxes

Check boxes, just like those used in Windows dialog boxes, can be a great addition to a worksheet. Here's how to add them ...

Discover More

Inserting Today's Date

When writing letters, reports, or other date-dependent documents, you need to regularly insert the current date in the ...

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)

Deleting Footnotes and Endnotes

Deleting either footnotes or endnotes is a simple process. Just select the reference mark and delete it. Assuming you are ...

Discover More

Moving Footnote Text into the Document

Need to move the contents of a footnote up into the main body of your document? You can use normal editing techniques to ...

Discover More

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
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 3 + 2?

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.