Converting hyperlinks to Endnotes

DB Novice
Lounger
Posts: 49
Joined: 14 Jan 2015, 23:04

Converting hyperlinks to Endnotes

Post by DB Novice »

I have a 463 page .docx with 1,367 hyperlinks that I would like to convert to endnotes (rather than the hyperlinks). Any thoughts?

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Converting hyperlinks to Endnotes

Post by macropod »

You can move hyperlinks into footnotes or endnotes, but that doesn't stop them being hyperlinks. For example:

Code: Select all

Sub HyperlinksToEndnotes()
Application.ScreenUpdating = False
Dim i As Long, EndNt As Endnote
With ActiveDocument
  For i = .Hyperlinks.Count To 1 Step -1
    With .Hyperlinks(i).Range
      Set EndNt = .Endnotes.Add(.Duplicate)
      EndNt.Range.FormattedText = .FormattedText
      .Delete
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
Paul Edstein
[Fmr MS MVP - Word]

DB Novice
Lounger
Posts: 49
Joined: 14 Jan 2015, 23:04

Re: Converting hyperlinks to Endnotes

Post by DB Novice »

Thanks, Paul. I will see if I can figure out how to run this and see if it accomplishes what I need. (I have minimal experience with VB in Word).

What I am ultimately trying to accomplish is going from a MOBI file to a Word document in order to import that into another program (Logos Bible program) that only recognizes .docx, but will have functionality for footnotes or endnotes that are in the Word document.

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Converting hyperlinks to Endnotes

Post by macropod »

For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
Paul Edstein
[Fmr MS MVP - Word]