Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Copying all foonotes to the end of the document

Posted on 2016-10-11
5
Medium Priority
?
29 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 53

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 53

Accepted Solution

by:
Rgonzo1971 earned 2000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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 article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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 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.

661 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