Solved

Copying all foonotes to the end of the document

Posted on 2016-10-11
5
14 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 48

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 48

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 13

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When creating Microsoft Word-based forms there may be a need to have a form field repeated throughout the whole document. For instance, with a company name, you may want this information repeated automatically throughout the document rather than man…
It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

707 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

12 Experts available now in Live!

Get 1:1 Help Now