Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-19-2020, 04:15 PM
Guessed's Avatar
Guessed Guessed is offline Convert hyperlinked text to text followed by URL Windows 10 Convert hyperlinked text to text followed by URL 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:
Sub Hyp2HTML()
  Dim aHL As Hyperlink, sPref As String, aRng As Range
  
  sPref = "<a target='_blank' href='"
  For Each aHL In ActiveDocument.Hyperlinks
    Set aRng = aHL.Range
    aRng.InsertBefore sPref & aHL.Address & "'>"
    aRng.InsertAfter "</a>"
  Next aHL
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
hyperlinks, urls



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert hyperlinked text to text followed by URL I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? AustinBrister Word VBA 8 05-28-2015 02:42 PM
Convert hyperlinked text to text followed by URL Convert image-text hybrids into plain text morlack Excel 4 12-03-2014 05:29 PM
My plain text post got converted to rich text in a reply, how to convert it back? david.karr Outlook 0 01-05-2012 09:46 AM
Searhc for Hyperlinked Word and replace with plain text or nothing somniloquist Word 3 10-04-2011 02:33 AM
Why isn't my hyperlinked word text hyperlinked when I convert it to pdf? Obisco Word 0 12-10-2010 01:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:36 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