A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

deleting_hyperlinks



 
 
Thread Tools Display Modes
  #1  
Old July 3rd 10, 03:48 AM posted to microsoft.public.word.docmanagement
via135
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
Ads
  #2  
Old July 3rd 10, 04:00 AM posted to microsoft.public.word.docmanagement
Jay Freedman
external usenet poster
 
Posts: 9,855
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  
Old July 3rd 10, 04:16 AM posted to microsoft.public.word.docmanagement
via135
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.