#1
|
|||
|
|||
Copy footnotes into text - with hyperlinks and framing characters
Hello!
I've found a number of macro's which copy the text of footnotes into the body text. However, I haven't been able to find a macro that does this for all footnotes in the document, while retaining the hyperlinks. For instance, this works well, but with hyperlinks being lost: Code:
Sub AddFnTextInBodyOfDoc() Dim f As Footnote Dim r As Range For Each f In ActiveDocument.Footnotes Set r = f.Reference r.Collapse wdCollapseEnd r.InsertAfter "$%" & f.Range.Text & "%$" Next f End Sub Any help would be much appreciated! |
#2
|
||||
|
||||
.InsertAfter deals with strings not formatted text so you can't use that. Try this instead
Code:
Sub AddFnTextInBodyOfDoc() Dim f As Footnote, r As Range For Each f In ActiveDocument.Footnotes Set r = f.Reference r.Collapse wdCollapseEnd r.InsertAfter "$%%$" r.Collapse wdCollapseStart r.MoveStart Unit:=wdCharacter, Count:=2 r.FormattedText = f.Range.FormattedText Next f End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
I can't thank you enough! That worked perfectly.
Thank you for your kindness. Have a great day |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro which finds hyperlinks and replaces them as footnotes | rabauck | Word VBA | 11 | 10-21-2022 03:55 PM |
Copy data if the Cell A1 has 4 characters in total | LearnerExcel | Excel | 1 | 05-31-2018 05:33 PM |
creating manuscript w/footnotes from separate documents containing chapters with footnotes-word 2010 | Dottie | Publisher | 0 | 02-19-2017 03:18 PM |
word 2016 printed footnotes do not restart as does digital copy | bhavard | Word | 8 | 03-26-2016 12:37 PM |
VBA to copy bookmark-hyperlinks to plain text strings | Marrick13 | Word | 2 | 04-29-2012 05:12 AM |