Solved

Copying all foonotes to the end of the document

Posted on 2016-10-11
5
16 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 49

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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now