deleting_hyperlinks

  • Thread starter Thread starter via135
  • Start date Start date
V

via135

hi all..!

when i copying text from web pages and paste it
into a word document all the hyperlinks are copied
as text format like {hyperlink........}

what i want is i don't need the hyperlinks either
in the text format or in the delinked format.
and to delete all such texts in one stroke..!

is there any macro / code to
achieve this..?

thanks and regds..!

-via135
 
hi all..!

when i copying text from web pages and paste it
into a word document all the hyperlinks are copied
as text format like {hyperlink........}

what i want is i don't need the hyperlinks either
in the text format or in the delinked format.
and to delete all such texts in one stroke..!

is there any macro / code to
achieve this..?

thanks and regds..!

-via135

This will do it:

Sub RemoveHyperlinks()
Dim nHL As Integer
With ActiveDocument
For nHL = 1 To .Hyperlinks.Count
.Hyperlinks(1).Range.Delete
Next
End With
End Sub
 
This will do it:

Sub RemoveHyperlinks()
    Dim nHL As Integer
    With ActiveDocument
    For nHL = 1 To .Hyperlinks.Count
        .Hyperlinks(1).Range.Delete
    Next
    End With
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroupso all may benefit.

yes wonderful..!
this is what i exactly wanted..!!
thanks Jay..!!!

-via135
 
Back
Top