View Single Post
 
Old 10-21-2022, 03:55 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The code in post #2 works as described. Unlike your requirements, though, it deletes the hyperlink's 'click' text. You can preserve that by changing:
Code:
.Range.Text = vbNullString
to:
Code:
.Range.FieldsUnlink
For just the active document, you could use:
Code:
Sub HLnk2FtNt()
Application.ScreenUpdating = False
Dim h As Long, Rng As Range
With ActiveDocument
  For h = .Hyperlinks.Count To 1 Step -1
    With .Hyperlinks(h)
      Set Rng = .Range
      With Rng
        .Collapse wdCollapseEnd
        .Footnotes.Add Rng
        .End = .End + 1
      End With
      Rng.Footnotes(1).Range.FormattedText = .Range.FormattedText
      .Range.Fields.Unlink
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote