View Single Post
 
Old 07-30-2020, 03:16 AM
in7el in7el is offline Windows 10 Office 2019
Novice
 
Join Date: Jul 2020
Posts: 5
in7el is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
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
I have attached a sample doc and ss of the two macros. Regards.
Attached Images
File Type: jpg Screenshot_1.jpg (57.9 KB, 19 views)
Attached Files
File Type: docx OriginalUrlSample.docx (11.7 KB, 6 views)
Reply With Quote