Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 07-30-2020, 03:55 AM
Guessed's Avatar
Guessed Guessed 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: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Try this code which toggles from one to the other
Code:
Sub ToggleURLs()
  Dim aHL As Hyperlink
  For Each aHL In ActiveDocument.Hyperlinks
    If aHL.TextToDisplay = "url" Then
      aHL.TextToDisplay = aHL.Address
    Else
      aHL.TextToDisplay = "url"
    End If
  Next aHL
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
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 05:04 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