Re-applying 'Hyperlink'-character style to all internet and e-mail addresses

Dear Experts:

I got a long document where internet and e-mail adresses such as ...
www.google.de or
info@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
0
andreas
6/6/2010 3:23:17 PM
word.vba.general 1023 articles. 1 followers. Follow

1 Replies
2289 Views

Similar Articles

[PageSpeed] 3

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@gmx.de> wrote:

>Dear Experts:
>
>I got a long document where internet and e-mail adresses such as ...
>www.google.de or
>info@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
0
Jay
6/6/2010 4:42:57 PM
Reply:

Similar Artilces:

Is it possible to display a character, but utilize a value in the same cell?
I am working on a schedule of inspections. I have a column that displays either a Q(Quarterly), S(Semi-Annual) or A(Annual) . I'd like to be able to link the column to an equation with the values 4, 2, or 1. (IE Quarterly is 4 inspections a year) Can a "Q" be displayed in a cell, but use a math value of 4 as part of an equation for further calculations For Example: Cell A I Cell B I Cell C I Cell D Qty I Insp I Hours I Total 2 Q .75 (2 x 4 x .75) = 6 inspection hours Annually I'd like the sheet to display the type of insp...

Foward mail to an external recipient from Public Folder
I need forward e-mail fromt a Public Folder to External recipient, but the rule not work (for internal recipient work fine). I have exchange 2003 and outlook 2003. Somebody can help me Regards On Thu, 20 Oct 2005 12:13:02 -0700, Walter Claro <WalterClaro@discussions.microsoft.com> wrote: >I need forward e-mail fromt a Public Folder to External recipient, but the >rule not work (for internal recipient work fine). >I have exchange 2003 and outlook 2003. >Somebody can help me > >Regards You need to allow auto-forwards under Global Settings in ESM. ...

transfer emails from my Mac ( mail stamp figure ) to my computer Microsoft Outlook #5
How can I transfer my emails. ...

Changing the text of a group in a Report style CListCtrl in Group-View
Hi, I have a CListCtrl derived object with Report-View using XP group view. All is worknig well, except that I can't change the text of an existing group. Here is my code snippet : LVGROUP lvGroup; ZeroMemory ( &lvGroup, sizeof (LVGROUP ) ); lvGroup.cbSize = sizeof ( LVGROUP ); lvGroup.mask = LVGF_GROUPID | LVGF_HEADER; lvGroup.iGroupId = nGroupID; // The group-id to change ... lvGroup.pszHeader = L"My Text"; lvGroup.cchHeader = wcslen ( lvGroup.pszHeader ); int nRes = SetGroupInfo ( nGroupID, &lvGroup ); .... Note that 'SetGroupInfo' always returns the Group...

Re:security update
After updating my Outlook with a security update CD my outlook wont send any mail out due to Protocol SMPT server response 550 relying to prohibited by administrator,Port 25 SSLNo server error.Help me get back Regards Gerry gerry <gerry_63@hotmail.com> wrote: > After updating my Outlook with a security update CD my > outlook wont send any mail out due to Protocol SMPT server > response 550 relying to prohibited by administrator,Port > 25 SSLNo server error.Help me get back Try enabling outbound server authentication. -- Brian Tillman ...

Return from a bookmark to its related hyperlink in the same doc?
I have a hyperlink to a bookmark in the same document. Once I've activated the hyperlink and Word has taken me to the bookmark location, how do I return to the hyperlink location that I started at? Here's what I'm doing...I've created a hyperlink for a glossary term in the doc. When I click on the hyperlink, it takes me to the bookmarked definition in the glossary at the end of the doc. When I'm done reading the defintion, is there any easy way to navigate back to where the hyperlink is in the doc? I've tried Ctrl+F5, but that takes me back to the l...

Exporting Address Book in outlook 2000
Outlook 2000 will not let me export my address book (the option is greyed out). When I tried following the directions for Outlook Express and took off Internet sharing all my addresses disappeared. How can I export my Address Book? Thanks! ...

deleting e-mail
I cannot delete incoming e-mail, either individually or "en masse" by using the CONT and SHIFT buttons. When I check the e-mails in their little boxes, and hit "Delete", they disappear temporarily from my in-box, and the trash can number goes up, but moments later the process is reversed and they reappear in my inbox and the trash can number goes down. The same thing happens when I try to "move" the e-mails into the junk or trash can folders. The end result is that I cannot permanently delete my incoming emails. What could cause this apparent undel...

filter incoming mails to public folder
Hello, I want to create public folders for companies like "comp_a", "comp_b" and so on. If the Exchange Server receive incoming mails from "*@comp_a.de", they should be moved to the public folder "comp_a". Is that possible ? The filter should be server-side, independently of one Outlook Client. Is an event sink the only solution ? If so, how can I do that ? thanks Dirk Ehlers Why don't you just set it up so any email sent to the @comp_a.de is CC:ed to the public folder. You will have to first under the public folder properties uncheck the hi...

Remove characters
I have seen many posts about removing character, but I have a very meesy spreadsheet that I want to do a remove on. I can't tell which field the char is in. " 2009 D h.hurst@hurstad.com 5/15/2009 W Postwar auto racing Lots of char that look like enter - how can I easily remove them from an entire txt file? Don't bring them into a worksheet it will make the problem worse. either manuall go to Notepad and replace the bad characters or write VBA code that opens a file and fixes the the problem in the text file and not in an excel worksheet. Below is a prog...

moving mails in mail enabled public folders
Hi, when user just drags a mail from the public folder and moves it to another public folder, it gets copied. How can I set it so that it gets moved? I know the shift key can be used, but I need it to work without any additional tasks then dragging the item. Thanks, Jan Drag with the right mouse button not left? Oliver On Wed, 21 Mar 2007 12:49:22 +0100, "Jan Kucera" <miloush@community.nospam> wrote: >Hi, > when user just drags a mail from the public folder and moves it to another >public folder, it gets copied. How can I set it so that it gets mo...

How do I do a Mail Merge in Excel?
I'm trying to create individual sales invoices for multiple recipients. How would I go about doing a mail merge in Excel, or is there a better way to get the same results? Hi Shauna See http://www.mvps.org/dmcritchie/excel/mailmerg.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Shauna" <Shauna@discussions.microsoft.com> wrote in message news:77CD5C06-E0FB-4BCA-A623-B6A253BD4E75@microsoft.com... > I'm trying to create individual sales invoices for multiple recipients. > How > would I go about doing a mail merge in Excel, or is there a better w...

E-mail domain black listed...help!
Our domain name has been blacklisted because Exchange had the unauthenticated relay feature turned on by default so our server was being used to relay spam. Does anyone here know how we can un-blacklist ourselves? We'd hate to have to change our domain name. We've tried changing IP addresses, but it's blacklisted at the name level. Thanks. Hello Jerry At the bottom of the following article is some information that will help you. 300580 XCON: Cannot Send E-Mail Messages to a Growing List of Domains http://kb/article.asp?id=Q300580 -- Michael Barta [MSFT] Microsoft Excha...

windows mail and publisher 2007
I have just loaded Publisher 2007, I have set Windows mail as the default e-mail, running Vista. When I try to use the e-mail feature on Publisher it keeps saying I need to Install Outlook and set as default. Outlook is not on Vista just Windows mail. You need Outlook 2007, not Windows Mail. -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "HL" <HL@discussions.microsoft.com> wrote in message news:2F5D9ABC-658E-4E0B-B2FC-9F16216764D6@microsoft.com... >I have just loaded Publisher 2007, I have set Windows m...

EARN $ 1,434,892.8 BY E-GOLD (GUARANTEED!!) All you need is 3 People You know #5
EARN $ 1,434,892.8 BY E-GOLD (GUARANTEED!!) All you need is 3 People You know Hello every body , im be glad to introduce one of the best MLM for every body who wants to explod his/her earning with very simple steps and incredible situation! JUST IMAGINE...... If you achieve only 10% success you will still make $ 143,489.28 If you achieve only 1% success you will still make $ 14,348.928 But If we trust to each other and be serious, reaching to $ 1,434,892.8 is not seem so far,just three or four weeks!! The whole works that you should do : 1) You should open an e-gold account ,th...

Damaged Hyperlink in Excel 2003 after saving an Excel Sheet
Hello, I've got a problem with hyperlinks in Excel 2003. Until I save the document they work fine - after saving a view of the hyperlinks are corrupted. There is a connection between the server which is named in the hyperlink and the setting under options-general called "standard save place" in german. I've got a mounted drive H which is located on \\filer\user\andy (Server is Windows 2000) and the entry H:\ on the option-general-tab. H:\ is connected with AD for the user (profil-"basic-folder") There's a further drive on this Fileserver for general using. It&...

1 Unread Mail Message won't go away
Hello, I have searched all my folders yet when I log off, the startup screen states that I have "1 Unread Mail Message". I cannot find it anywhere. Suggestions? RSR ...

How do I enter a formula in a cell so that letters= a number i.e..
How do I enter a formula in a cell so that letters= a number i.e Y=5, N=2. Try this. Change 'cell_ref' to the cell with a letter in. =If(cell_ref="Y",5,If(cell_ref="N",2,"")) "Alex" wrote: > How do I enter a formula in a cell so that letters= a number i.e Y=5, N=2. See one response in your identical post in .newusers (Please do not multi-post) -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "Alex" <Alex@discussions.microsoft.com> wrote in message news:F901AB86-A3DF-4...

mailing labels #2
Is there any way to print customer mailing labels to the barcode/label printer? I'm not aware of a way you can print labels directly from Store Ops. I think the easiest way to achieve what you want would be through a mail merge Word document. I have done exactly that but have used Avery mailing labels which fit 30 to a standard 8.5 x 11 sheet. Create an Excel file of the names and addresses and then create a mail merge document linking to it. It works great. On Feb 1, 2:50 pm, "Tom" <m...@woodenwheels.com> wrote: > Is there any way to print customer mailing labels...

How to change return address?
My boss seems to think I'm a whiz on IT (hah!) and wants to change the address in his Outlook so that his recipients will see my_boss@my_company.com in their incoming posts. Now, I don't use Outlook (I'm on my eighth year of Eudora), so I have no idea of how I might go about this. This is Outlook not Outlook Express (if the difference is important). Can anyone help, please? TIA. ------------------------------------------------------------ This post did not necessarily reflect my opinions. So there. Pull the pins out to reply direct. Fat Bloke <fatblokeonbike@pinsjohnstone-wh...

update JUNK MAIL FILTER in terminal server
This is a multi-part message in MIME format. ------=_NextPart_000_00C2_01C6106F.E22270C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Everyone! I would like to know if there is some restriction or some special = configuration to install the Junk mail filter update in a server with = terminal server. My users access the Outlook over TS. And some users = reclaim that junk does not work very well .. I thought that can problem = with Junk update.. I actualize how administrator user .. but, I don=B4t = know if in the others users is a...

OWA2003
Hi everybody, I would like to know how to enable and unforce the "filter junk e-mail" option (in the options\Privacy and Junk E-Mail Prevention) for all the users in my Organization . Thanks This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C68FC3.5E18B4F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I found the solution. I use OWA Admin Tool, and selected the back-end = mailbox server (when selecting the front-end server, the options was = grayed). "Antoine Golio" <a.golio@123mu...

Mail not getting through for ISP
OL 2007 and Vista. All my mail is (was) backed up at my ISP. They have checked everything at their end and all is fine. I get the occassional mail but had 80 mails in my ISP mail box. I tried repairing OL this didn't help. I then unistalled Office 2007 with OL 2007 and reinstalled. Still the mail was not collected from "mail.btinternet.com". I call ed the ISP and agian they said all was well at thier end. They suggested I set up MS mail and give it all the same details as OL has which I did. 89 e-mails came straight in to MS mail and all was retrived fine. But I want OL...

importing mail boxes from 3rd party freeware
Plz help! I have been using mail enable (www.Mailenable.com). I have setup Exchange 2003 and want all my mail boxes, information store to be exported/imported to exchange 2003. How can I do it? plz its urgent I have to implement exchange for better spam control. SSB0aGluayBpdCB3b3VsZCBiZSBsZXNzIGhhc3NsZSB0byBsb29rIGZvciBhbiBBbnRpU1BBTSBT b2x1dGlvbiB3aGljaCB3b3JrcyB0b2dldGhlcg0Kd2l0aCBNYWlsIEVuYWJsZS4gVGhlcmUgYXJl IHNvIG1hbnkgb24gdGhlIG1hcmtldC4NCg0KDQoNCiJhbGkiIDxhbm9ueW1vdXNAZGlzY3Vzc2lv bnMubWljcm9zb2Z0LmNvbT4gd3JvdGUgaW4gbWVzc2FnZSBuZXdzOjEyMDkwMWM0OGMxNiQ4MDEz NjNhMCRhNjAxMjgwYUBwaHgu...

IMAP accounts not recieving mail in scheduled send & recieve
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: imap Hello all, <br> I have a problem with send and receive for my IMAP email accounts. I run a small business and have configured two computers to receive the same email. <br><br>When the scheduled send and receive runs it does not pull new emails from the server. it does pull them in on start up and when i click on the folder. <br><br>I have checked the boxes in the send and receive settings and tried both &quot;new mail&quot; &amp; &quot;all mail&...