How do I remove multiple hyperlinks at one time?

G

Guest

I've downloaded information from an encyclopedia article for my class and
want to eliminate the hyperlinks in order to use the information in
developing overheads. Unfortunately, there are over 100 within the Word 2003
document, and to save time, I would like to know how to remove all of the
links together rather than individually. Help!
 
G

Guest

Cool, such an easy fix for a problem I had wondered about on various
occasions. But, what are these keystrokes doing? CTRL+a & CTRL+SHIFT+F9 are
hotkey commands for what actually?

I don't use Word enough to study it in depth, but would like to know, as
this is a function I will use often. Thanks.
 
G

Greg Maxey

Dog,

CTRL+a selects all
CTRL+Shift+F9 unlinks fields (changes to regular text)

Programatically:
Sub Scratchmacro()
Dim oRng As Range
Set oRng = ActiveDocument.Range 'CTRL+a selects everything
oRng.Fields.Unlink 'CTRL+Shift+F9 unlinks the selected fields
End Sub
 
G

Greg Maxey

My programatic example wasn't a very good one. More like:

Sub ScratchMacro()
ActiveDocument.Range.Select 'or CTRL+a to select everything
Selection.Fields.Unlink 'or CTRL+Shift+F9 to unlink the selected fields
End Sub
 
D

Daiya Mitchell

Dog, you should also be aware that this will unlink all fields in the
document. Hyperlinks are only one type of field, it's possible you have
others in a document.

For the example you gave, this process will be pretty safe--on more
complicated documents, it may have unintended consequences.
 
G

Greg Maxey

Dog,

Of course Daiya is correct. If you wanted to unlink just hyperlink
fields then you would have to select them individually and press CTRL
+Shift+F9 or programatically like this:

Sub Scratchmarcro()
Dim oFld As Word.Field
For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldHyperlink Then
oFld.Unlink
End If
Next oFld
End Sub

Note the code above would just act on the current storyrange (i.e.,
the main text if you are working in the main text area). To act on
all story ranges you would need a bit more code. See:

http://gregmaxey.mvps.org/Field_Macros.htm
 
M

Matthew W. I. Dunn

A suggestion for those who don't want to unlink every darn field in their
carefully-crafted documents while trying to remove hyperlinks:


Add the SELECT HYPERLINK button to your Quick Access Toolbar;
Add the REMOVE HYPERLINK button to your Quick Access Toolbar;
Select the FIND button, which will open the Find and Replace tool;
Select MORE >> and FORMAT at the bottom;
Select FONT and choose the options that best fit the way the hyperlink has
been formatted in the text: if it's been underlined; if it's given as a
superscript; if it's in the color Blue. (Try to be a specific as possible!)
Click FIND NEXT;
As the tool jumps through the document finding the formatted text, you'll
notice that the SELECT HYPERLINK button in the toolbar is highlighted: click
it;
Click the REMOVE HYPERLINK button, and the hyperlink will be remove.

You'll find that you can still move pretty rapidly through the document,
albeit not as quickly as simply selecting all of the text and hitting
CTRL+SHIFT+F9. However, this is meant for those who might have a number of
linked fields that are not hyperlinks per se.

Seems to me that the "Divines" who worked on Microsoft Word 2007 could have
easily added the option of searching for hyperlinks to the "Special"
drop-down box in the Find and Replace tool. Or, created a tool to remove --
quickly and easily -- certain formatting features, like hyperlinks. I guess
we'll have to wait until the release of Office 2057 for such revolutionary
features.
 

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