EZ way to replace hyperlinks?

T

TortFeasor

I'd like an easy way to do the following:
1. Find all hyperlinks in a document and replace them with underlined, blue text.
2. Find all hyperlinks in a document (or selection) and replace them with the full web address, and delete the hyperlink itself.

Any clues?

TortFeasor@Cell#99.CountyJail.Net
 
S

Suzanne S. Barnhill

If hyperlinks are the only kinds (or the predominant kind) of field in your
document, the quickest way will be to use F11 to jump from one to the next.
When you land on a field it will be selected. At that point you need to do
two things:

1. Press Ctrl+Shift+F9 to unlink the hyperlink. This will leave the link as
plain text.

2. While it is still selected, apply the Hyperlink character style, which is
blue and underlined. For this purpose, assign a temporary keyboard shortcut
to the style. You could even, if there are a lot of such hyperlinks, record
a macro of unlinking the field and applying the style, then assign a
keyboard shortcut to that.



I'd like an easy way to do the following:
1. Find all hyperlinks in a document and replace them with
underlined, blue text.
2. Find all hyperlinks in a document (or selection) and replace them
with the full web address, and delete the hyperlink itself.

Any clues?

TortFeasor@Cell#99.CountyJail.Net
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Use the following code in a macro:

Dim ahlink As Hyperlink

'Task 1
For Each ahlink In ActiveDocument.Hyperlinks
ahlink.Range.Font.Color = wdColorBlue
ahlink.Range.Font.Underline = wdUnderlineSingle
Next ahlink
'Task 2
For Each ahlink In ActiveDocument.Hyperlinks
ahlink.Range = ahlink.Address
Next ahlink


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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