Removing a group of hypertext links or all hypertext links in a document

T

Terri Creagh

I am trying to remove hypertext links from a whole column of a Word table.
If I select the column and then try to do it through 'Edit - Links' , the
'Links' option is grayed out. If I right click on the group of links, the
'remove hypertext link' option does not come up.



Also, is there any way to remove all hypertext links in an entire Word
document if the 'Edit - Links' command is grayed out?



Thank you.

Terri
 
G

Graham Mayor

If you want to remove the Hyperlink completely use the replace function.
Select 'More' and replace Hyperlink style with nothing. (Don't put any text
in the find or replace boxes).

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jay Freedman

Hi Terri,

This will work in tables, text, or anywhere else:

First, display field codes in place of field results, by pressing Alt+F9.
The hyperlinks will all turn into something like
{ HYPERLINK "http://word.mvps.org/FAQs/index.htm"}

(Note: if you don't see quotes around the URL, then the newsgroup posting
mechanism has reformatted it. You'll see quotes in the field code.)

Select the part of the document that you want to remove hyperlinks from. If
you want to remove hyperlinks from the entire document, just put the cursor
at the beginning.

Now open the Edit > Replace dialog. Put this in the Find What box:

^19 HYPERLINK

The ^19 represents the left bracket of the code. You do need the space
between the 9 and the H. Leave the Replace With box empty and click Replace
All. If you had some text selected, Word will ask whether to continue
searching; click No.
 
T

Terri

Thanks for your answer. I tried that, and it gets rid of the text as well
as the URL to which the text is linked. I think I was probably not clear in
how I explained the problem. What I want to do is break the link. I do not
want to remove the text that is linked. In other words, when the cursor is
put on a company name that I have in my document, clicking on that name will
go to a specific URL that is linked to that company name. I do not want to
delete the company name, but I do want to break the link.

I hope that is a little clearer explanation. Can this be done?
Thank you.
Terri
 
J

Jay Freedman

Hi Terri,

OK, that does make a difference.

Here are two alternatives:

- If the hyperlinks are the *only* fields in the document body
(remember that fields include dates, times, page numbers other than
ones in headers/footers, and other things), or if there are other
fields but you don't mind converting them to plain text so they'll
never update again, you can select all (Ctrl+A) and unlink fields
(Ctrl+Shift+F9).

- If there are other fields and you need to be selective about
changing only the hyperlinks, use this small macro:

Sub UnlinkHyperlinks()
Dim nHL As Long
For nHL = 1 To ActiveDocument.Hyperlinks.Count
ActiveDocument.Hyperlinks(1).Delete
Next nHL
End Sub

If you need instructions to use the macro, see
http://www.gmayor.com/installing_macro.htm.
 
T

Terri

Yes, that will work, but it will only remove one link at a time. It will
not unlink all the links in a section of a document. Do you have any idea
how to do that?
Thanks.
Terri
 

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