![]() |
#4
|
||||
|
||||
![]() Quote:
Code:
Sub CopyHyperlink() Dim Rng As Range With Selection.Hyperlinks(1).Range.Fields(1) Set Rng = .Code With .Code With .Find .ClearFormatting .Replacement.ClearFormatting .Format = False .Forward = True .Wrap = wdFindStop .MatchWildcards = False .Text = "\l" .Replacement.Text = "#" .Execute Replace:=wdReplaceAll .Text = "HYPERLINK" .Replacement.Text = "" .Execute Replace:=wdReplaceAll .Text = "^w" .Execute Replace:=wdReplaceAll .Text = Chr(34) .Execute Replace:=wdReplaceAll End With End With End With Rng.Copy While InStr(Rng.Text, "HYPERLINK") = 0 Undo Wend End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extract name and address. | donlincolnmsof | Word VBA | 1 | 11-10-2017 12:59 PM |
Add Hyperlink in Visio that when clicked copies something to your clipboard | MoHyB | Visio | 0 | 11-10-2017 08:55 AM |
![]() |
marceepoo | Word VBA | 1 | 09-14-2012 08:20 PM |
How to extract selected boilerplate into a new doc | mturner296 | Word | 0 | 03-29-2010 07:35 AM |
![]() |
zssteen | Excel | 1 | 06-19-2009 02:32 AM |