Solved

Copying all foonotes to the end of the document

Posted on 2016-10-11
5
21 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 51

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 51

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

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…
I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

734 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