Combining Footnotes

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


1

Daniel has an academic paper that uses many footnotes. Right now, he has footnotes at the end of each sentence. He would like to combine all of the footnotes within a paragraph into a single footnote at the end of the paragraph. He wonders if there is a way to do this automatically.

There is no way to do this automatically, but you can do it with a macro. All the macro needs to do is to step through each paragraph in the document and see if it has any footnotes. Then, assuming it does, it concatenates those, deletes the footnotes, and adds a new footnote with the concatenated text at the end of the paragraph. Here's a macro that does just that:

Sub MoveFootnotes()
    Dim p As Paragraph
    Dim iFN As Integer
    Dim J As Integer
    Dim oCurPar As Object
    Dim sTemp As String

    For Each p In ActiveDocument.Paragraphs
        sTemp = ""
        iFN = p.Range.Footnotes.Count
        For J = iFN To 1 Step -1
            sTemp = p.Range.Footnotes(J).Range.Text & " " & sTemp
            p.Range.Footnotes(J).Delete
        Next J
        sTemp = Trim(sTemp)
        If sTemp > "" Then
            Set oCurPar = p.Range
            oCurPar.Collapse Direction:=wdCollapseEnd
            oCurPar.MoveEnd Unit:=wdCharacter, Count:=-1
            ActiveDocument.Footnotes.Add Range:=oCurPar, Text:=sTemp
        End If
    Next p
End Sub

Note that the macro concatenates the footnote text for each paragraph into the sTemp string. This is then used when adding the footnote to the end of the paragraph. This does present a drawback to the macro—it copies only text, not any formatting for the text.

For instance, if you have a bunch of footnotes that include citations to books, chances are good that those book titles are formatted in italic. After running the macro, the italic will be gone, though all the text is there. (There is no way that I'm aware of to transfer the formatting, intact, into the new footnote.)

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

Inserting Special Spaces

Do you need to frequently add en spaces and em spaces to your documents? You can add special tools to Word that make ...

Discover More

Anchoring Comment Boxes in Desired Locations

Want your comment boxes to appear someplace other than the right side of a cell? You may be out of luck, and here's why.

Discover More

Running a Macro when a Worksheet is Activated

Want to run a macro when you first select a worksheet? You can do so by using one of the event handlers built into Excel, ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Word Adds Extra Space before Footnote Marker

When using full justification of your text, you may get extra spaces in places you never wanted. This tip examines one ...

Discover More

Reference to a Range of Endnotes

When multiple endnote references are used at a given point in your document, you may wonder if there is a way to compress ...

Discover More

Continuous Formatting for Footnotes

If you've got a lot of short footnotes in a document, you might be looking for a way to save space by "crunching up" 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 7 + 0?

2020-06-08 13:24:29

Andrew

Here's the way I would do it, using the Clipboard to retain the formatting of each footnote's text, and permitting a specified separator text to be inserted between the original footnotes' text and a prefix to each footnote.

Sub CombineParagraphFootnotes()
Const Prefix As String = "Fn: " ' Set to "" to not have a prefix,
Const Separator As String = " " ' Set to "" to not have a separator.
Dim P As Paragraph
Dim CurNo As Integer
Dim AggregatedFootnote As Footnote

For Each P In ActiveDocument.Paragraphs
If P.Range.Footnotes.Count > 0 Then
' Add a new footnote to the end of the paragraph.
Set AggregatedFootnote = ActiveDocument.Footnotes.Add(Range:=P.Range) ' Here, "Range" parameter is the *paragraph's text*
' Loop backwards through the paragraphs footnotes, except the newly created last one
For CurNo = P.Range.Footnotes.Count - 1 To 1 Step -1
' Move the Footnote's formatted text to the beginning of the new footnote via Clipboard
AggregatedFootnote.Range.Select
Selection.Collapse Direction:=wdCollapseStart
P.Range.Footnotes(CurNo).Range.Cut
Selection.Paste
' Add Separator and Prefix.
AggregatedFootnote.Range.Select
Selection.Collapse Direction:=wdCollapseStart
If CurNo <> 1 Then Selection.InsertAfter Separator ' No Separator for first footnote (= last iteration).

Selection.InsertAfter Prefix
P.Range.Footnotes(CurNo).Delete
Next CurNo
End If
Next P
End Sub


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.