Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 07-30-2020, 01:41 AM
gmayor's Avatar
gmayor gmayor is offline Can anyone help me with renaming of specific hyperlinks macro Windows 10 Can anyone help me with renaming of specific hyperlinks macro Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone help me with renaming of specific hyperlinks macro Macro: How to get this macro to save to a specific location LOUF Word VBA 1 12-07-2015 06:47 PM
Can anyone here tweek this macro for renaming Excel files based on a cell's contents? chrisd2000 Excel Programming 6 07-01-2014 01:53 PM
Macro Needed to bold specific lines and Macro to turn into CSV anewteacher Word VBA 1 05-28-2014 03:59 PM
Image Renaming Macro? jammer PowerPoint 5 07-15-2013 09:21 AM
Create Hyperlinks from Word to specific location in PDF sukanyae Word 0 02-25-2010 04:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft