Solved

Copying all foonotes to the end of the document

Posted on 2016-10-11
5
19 Views
Last Modified: 2016-11-11
Hi. I would appreciate your help with two issues. FIRST ISSUE, I found a macro online to copy footnotes and paste them inside the paragraph, I would guess that it is possible to copy all footnote contents at the end of the document. This is the macro I found, but evidently if it can be changed to copy them at the end I would also appreciate it if someone could edit it.

Sub MoveFootnote()
    If Selection.Footnotes.Count = 1 Then
        Selection.Footnotes(1).Range.Copy
        Selection.Collapse direction:=wdCollapseStart
        Selection.Paste
        Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
        Selection.Delete Unit:=wdCharacter, Count:=1
    End If
End Sub

SECOND ISSUE. The macro does only one footnote at a time. I have searched online to find how to make the macro repeat the action until all footnotes are moved, but unfortunately my knowledge of VBA is still basic.

Thank you in advance for your help. Have an awesome day!
Pat
0
Comment
Question by:Pam Ross
  • 2
  • 2
5 Comments
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 41838537
Hi,

This code convert Foot notes in end notes

    ActiveDocument.Footnotes.Convert 

Open in new window

Regards
0
 

Author Comment

by:Pam Ross
ID: 41838542
Thank you, Rgonzo. But I don't want to convert them to endnotes because my macro is about cleaning all the format of the document. So I just want the macro to copy all the footnotes as regular unformatted text at the end of my document.

Sorry, I should have clarified that in my question. I will edit it. Thanks again!

Paty
0
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41838572
then try
Sub MoveFootnote()
    ActiveDocument.Select
    For Each fn In Selection.Footnotes
        strText = strText & vbNewLine & fn.Range.Text
    Next
    Selection.Collapse Direction:=wdCollapseEnd
   Selection.TypeText strText
 End Sub

Open in new window

Regards
0
 

Author Comment

by:Pam Ross
ID: 41838597
It worked wonderfully! Thanks SO much, Rgonzo. If I can abuse your willingness to help. I also posted a question about another macro that I am trying to create to break numbered items within a paragraph into a new line or paragraph.

You have no idea how much easier you made my day today!

Thanks a lot.

Pat
0
 
LVL 14

Expert Comment

by:frankhelk
ID: 41883554
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Rgonzo1971 (https:#a41838572)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question