PC Review


Reply
Thread Tools Rate Thread

deleting_hyperlinks

 
 
via135
Guest
Posts: n/a
 
      3rd Jul 2010
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
 
Reply With Quote
 
 
 
 
Jay Freedman
Guest
Posts: n/a
 
      3rd Jul 2010
On Fri, 2 Jul 2010 19:48:12 -0700 (PDT), via135 <(E-Mail Removed)>
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.
 
Reply With Quote
 
via135
Guest
Posts: n/a
 
      3rd Jul 2010
On Jul 3, 8:00*am, Jay Freedman <jay.freed...@verizon.net> wrote:
> On Fri, 2 Jul 2010 19:48:12 -0700 (PDT), via135 <via...@gmail.com>
> 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 newsgroupso all may benefit.


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

-via135
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:09 PM.