View Single Post
 
Old 07-30-2020, 01:41 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Based on this and your other post at Help to create a Word macro to change re-named Hyperlinks back to their full web addr the following should work. If not, do as Iasked and send a sample document.



Code:
Sub Macro1()
Dim oLink As Hyperlink
    For Each oLink In ActiveDocument.Hyperlinks
        If UCase(oLink.TextToDisplay) Like "*URL*" Then
            oLink.TextToDisplay = oLink.Address
        End If
    Next oLink
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote