deleting_hyperlinks

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
 
J

Jay Freedman

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
 
V

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

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top