Mass remove [internal] hyperlinks?

S

Shana

I have a Help document that I need to remove all internal hyperlinks from. I
know I can do this by right-clicking and selecting Remove Hyperlink. Is there
a way to do this for the whole document, so I don't have to do them all
individually??

thx
 
S

Suzanne S. Barnhill

If there are no other fields in the document, you can use Ctrl+A,
Ctrl+Shift+F9.
 
D

Dawn Crosier, Word MVP

As Suzanne mentioned you can remove all the fields at once using her
technique.

However, if you do happen to have other types of fields, Tables of
Contents, Cross-references, etc. then this macro may help...

'For use when CTRL+SHIFT+F9 just won't do the trick.
Public Sub DelHyperlink()
On Error GoTo BYE
Count = 0
Btn = MsgBox("This macro will remove all hyperlinks." & vbCrLf & _
"Are you READY TO PROCEED?", vbQuestion + vbYesNo, _
"Remove Hyperlinks")
If Btn = vbNo Then Exit Sub
myStartCount = ActiveDocument.Hyperlinks.Count
For i = 0 To myStartCount - 1
ActiveDocument.Hyperlinks(1).Delete
Count = Count + 1
Next
BYE:
MsgBox "There were" & Str(myStartCount) & " hyperlinks found in
document" & vbCrLf & _
"and" & Str(Count) & " hyperlinks deleted from the document.",
vbInformation + vbOKOnly, _
"Final Results"
End Sub

See http://www.gmayor.com/installing_macro.htm if you need help with
installing.

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"
This message is posted to a newsgroup. Please post replies and questions
to the newsgroup so that others can learn as well.




I have a Help document that I need to remove all internal hyperlinks from. I
know I can do this by right-clicking and selecting Remove Hyperlink. Is there
a way to do this for the whole document, so I don't have to do them all
individually??

thx

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.15/1174 - Release Date: 12/6/2007 10:11 AM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.15/1174 - Release Date:
12/6/2007 10:11 AM
 

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