Mass Conversion of Hyperlinks

P

PT

I frequently make a Word document from Wikipedia articles. In many
cases, almost every third word is an embedded hyperlink. I know how
to convert them to plain text one at a time.

Is there any way to make a global conversion from hyperlik to plain
text?
 
J

Jay Freedman

Use this macro (see http://www.gmayor.com/installing_macro.htm if
needed):

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

It does leave the text of each link in place, and just deletes the
address information (and the blue/underlining formatting).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
S

Sesquipedalian Sam

I frequently make a Word document from Wikipedia articles. In many
cases, almost every third word is an embedded hyperlink. I know how
to convert them to plain text one at a time.

Is there any way to make a global conversion from hyperlik to plain
text?

Suzanne's solution is the best if you want to retain the source
formatting, but get rid of *all* fields.

If you want the text to assume the destination formatting, use
Alt+Ctrl+V (instead of Ctrl-V), then select Unformatted text. If the
source has tables and other complex web markup, this will get rid of
it all. The paste step can be much faster.
 
S

Suzanne S. Barnhill

I'm not sure what you mean. It will convert all hyperlinks in the selected
text. I do this frequently with blocks of text pasted from Wikipedia. I then
use Ctrl+Spacebar to remove font formatting, but you could also use
Sequipedalian Sam's suggestion of pasting as unformatted text.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
S

Sesquipedalian Sam

I'm not sure what you mean. It will convert all hyperlinks in the selected
text. I do this frequently with blocks of text pasted from Wikipedia. I then
use Ctrl+Spacebar to remove font formatting, but you could also use
Sequipedalian Sam's suggestion of pasting as unformatted text.

The problem I have with Ctrl+Space if there are hyperlinks is that it
does *not* convert the hyperlinks, but it *does* remove the formatting
(blue underline) so they go into stealth mode. I don't like stealth
hyperlinks in my document.
 
S

Suzanne S. Barnhill

But my suggestion was to use Ctrl+Shift+F9 to unlink the hyperlinks (which
also removes the Hyperlink character style formatting) and Ctrl+Spacebar to
remove font formatting that doesn't match the document style. When more than
one paragraph has been pasted, however, most likely it will be in Normal
(Web) style, so a more effective approach (which also doesn't affect small
portions intentionally formatted as bold or italic) is to apply Normal or
Body Text style to those paragraphs.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

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