Reply
 
Thread Tools Display Modes
  #1   Report Post  
wklind wklind is offline
Junior Member
 
Posts: 1
Question Yet Another Remove Hyperlink Question...

I have several Word macros that can and do delete all hyperlinks in any Word document. None provide what I am looking for. I need a Word macro that will delete all external hyperlinks leaving the text in place (but not preserving any underlines or coloring)... I also need to leave in place any hyperlinks that are internal (bookmark) hyperlinks. I want the macro to run without human intervention. No 'yes' or 'no' questions.
  #2   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
 
Posts: n/a
Default Yet Another Remove Hyperlink Question...

The following will delete hyperlinks, leaving the text in place without
underlines or colouring while preserving cross-references to bookmarks in
the document.

Dim i As Long, hrange As Range, htext As String
With ActiveDocument
For i = .Hyperlinks.Count To 1 Step -1
Set hrange = .Hyperlinks(i).Range
htext = hrange.Text
hrange.Delete
hrange.InsertBefore htext
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"wklind" wrote in message
...

I have several Word macros that can and do delete all hyperlinks in any
Word document. None provide what I am looking for. I need a Word macro
that will delete all external hyperlinks leaving the text in place (but
not preserving any underlines or coloring)... I also need to leave in
place any hyperlinks that are internal (bookmark) hyperlinks. I want
the macro to run without human intervention. No 'yes' or 'no'
questions.


--
wklind



Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlink opens with wrong application Hullaballoo Microsoft Word Help 3 July 30th 05 06:22 AM
Adding Hyperlink to documents > 100 pages - Headings Expanded Prob AquaticFarmer Microsoft Word Help 0 July 15th 05 11:42 PM
Hyperlink Hijinks Larry Shoots Microsoft Word Help 2 February 28th 05 06:57 PM
Can more than one hyperlink at a time can be removed from a wo blueboy Microsoft Word Help 1 February 26th 05 09:53 PM
Hyperlink bug Jimbo Microsoft Word Help 0 February 1st 05 07:15 PM


All times are GMT +1. The time now is 04:55 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"