From: Jay Freedman on
The solution depends on exactly what you mean by "have lost their
character style "Hyperlink". If the text in question still consists of
hyperlinks (that is, when you hover over one it shows the destination,
and clicking or Ctrl+clicking activates the link), then this macro
will reapply the style to make them look right:

Sub RestoreHyperlinkStyle()
Dim hl As Hyperlink
For Each hl In ActiveDocument.Hyperlinks
hl.Range.Style = wdStyleHyperlink
Next
End Sub

However, if they are now just plain text and not hyperlinks (maybe
because the hyperlink fields have been unlinked by Ctrl+Shift+F9),
then a macro isn't required--all you need to do is run AutoFormat. If
you have Word 2003 or earlier, follow these steps:

1. Click Tools > AutoCorrect Options > AutoFormat (not "AutoFormat As
You Type").

2. Uncheck all the options except "Internet and network paths with
hyperlinks". Click OK.

3. Click Format > AutoFormat. Make sure "AutoFormat now" is selected
and click OK.

If you have Word 2007 or 2010, follow these similar steps:

1. Right-click a blank area of the Quick Access Toolbar and choose
Customize the Quick Access Toolbar. Select the All Commands category,
select the AutoFormat Now command, and add it to the Quick Access
Toolbar.

2. Click Office button ("File" in 2010) > Word Options > Proofing >
AutoCorrect Options > AutoFormat.

3. Uncheck all the options except "Internet and network paths with
hyperlinks". Click OK.

4. Click the AutoFormat Now button on the Quick Access Toolbar.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.


On Sun, 6 Jun 2010 08:23:17 -0700 (PDT), andreas
<andreas.hermle(a)gmx.de> wrote:

>Dear Experts:
>
>I got a long document where internet and e-mail adresses such as ...
>www.google.de or
>info(a)factory.de
>
>... have lost their character style "Hyperlink".
>
>How can I get Word via VBA to re-apply this character style to all
>occurrences of URL's and e-mail addresses.
>
>Help is much appreciated.
>
>Thank you very much in advance.
>
>Regards, Andreas