#1   Report Post  
Posted to microsoft.public.word.docmanagement
via135 via135 is offline
external usenet poster
 
Posts: 2
Default deleting_hyperlinks

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
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default deleting_hyperlinks

On Fri, 2 Jul 2010 19:48:12 -0700 (PDT), via135
wrote:

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

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
via135 via135 is offline
external usenet poster
 
Posts: 2
Default deleting_hyperlinks

On Jul 3, 8:00*am, Jay Freedman wrote:
On Fri, 2 Jul 2010 19:48:12 -0700 (PDT), via135
wrote:





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

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


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

-via135
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:24 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"