![]() |
|
#4
|
||||
|
||||
|
Hi Eric,
With the code I posted, I was actually being careful to not 'unmake' the hyperlinks! Try: Code:
Sub TagHyperlinks()
Dim i As Long
With ActiveDocument
For i = .Hyperlinks.Count To 1 Step -1
With .Hyperlinks(i)
.Range.InsertBefore "<a target=""_blank"" href=""" & .Address & """>"
.Range.InsertAfter "</a>"
.Range.Fields(1).Unlink
End With
Next
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 03-28-2012 at 03:00 PM. Reason: Code fix. |
| Tags |
| link, macro, vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Convert html links into embedded hyperlinks
|
njcloud | Mail Merge | 23 | 02-04-2020 02:00 PM |
Can't open Office 2007 embedded as objects in Word
|
DK8220 | Word | 5 | 11-02-2011 01:06 AM |
Macro to loop in subfolders, change links, export xml data
|
Catalin.B | Excel Programming | 2 | 09-08-2011 11:37 PM |
Embedded links
|
spheon | Word | 1 | 06-07-2011 04:11 PM |
| Embedded Excel in Word very slow to update | delaneybob | Word | 0 | 02-11-2011 10:03 AM |