February 26 2007 • 2:19 PM

Cleaning Up Hyperlinks from Word Text

Like many InDesign users, Terry V. is not fond of Word’s hyperlinked text. He writes:

To me it is a major annoyance that when I import a Word file, all the hyperlinks are in boxes with blue underlined text. Word automatically makes hyperlinks clickable and gives these this hideous layout to make sure your eye doesn’t miss this ugliness, hoping that I click on it so the color changes to another ugly color.

I usually delete the character style ‘Hyperlink’ without keeping the formatting. But then there still is a box around it. Even when I cut the text and paste it without formatting, the box remains visible.

So my questions:
- What is that annoying box?
- How do I get rid of it (or bring it on in the totally theoretical case I might want to use it)?
- How do I avoid those hyperlinks from being imported and messing up both my perfectly fine layout and my happiness being an InDesign user?

The problem is that one of Microsoft Word’s default behaviors is to automatically turn anything it recognizes as a web site or e-mail address into a hyperlink as soon as the user types it. You can click that link in Word and it will bring you to the web site or create a pre-addressed e-mail message.

When you bring the text into InDesign by pasting without the formatting, the “hyperlinkness” of the text still comes through — the hidden HTML code that Word added. The gray boxes that you see are the default appearance for any hyperlinks in InDesign, so that when the file is exported to PDF, it’s easy for the user to find the linked text.

Stop them in Word
It’s a pain to “unlink” these in Word, even if the user could figure out how. So the best bet is to ask your Word users to turn off the default behavior, if not for all their documents, then at least for the articles they’re preparing for your layout.

It’s simple: Go to Word’s Tools menu and open the AutoCorrect… dialog box. Click on the AutoFormat as You Type panel and in the Replace As You Type section, turn off the checkbox next to “Internet paths with hyperlinks.”

This doesn’t clear out any links it’s already created in the current document, but does prevent it from adding links to text that’s typed from then on.

Remove them in InDesign
The only way you’ll end up with Word’s hyperlinked text in your InDesign document is if you retain Word formatting when you place the file. If you choose Remove Styles and Formatting in the Import Options dialog box before you place it, you won’t get the hyperlinks — no formatting, no hidden code. (So this is a better option than pasting without formatting, as the user was doing above.)

However, if you turn on the option to Retain Local Formatting (usually a good idea to retain specific bold and italic formatting), no code is retained but the links will still appear in that lovely RGB blue color and underlined. Not a big deal, it’s just a local override. Hold down the Option/Alt key when you apply your Paragraph Style to get rid of it.

You will see both the boxes and the blue/underlined formatting if you place the Word file with formatting intact.

Even in this case, it’s fairly simple to clean them up:

  1. In your Character Styles palette, delete the one called Hyperlink (it came with the Word file) and at the prompt, replace it with [None] and turn off the Preserve Formatting checkbox. That clears out the blue color and underlines from the affected text.
  2. Go to Window > Interactive > Hyperlinks and shift-click all of the entries that appear in the palette. (If you actually have some hyperlinks you created in InDesign that you want to keep, select only the ones that came with Word — they’re called Hyperlink, Hyperlink 2, Hyperlink 3, and so on.) Then click the trashcan icon at the bottom of the palette to delete the Word hyperlinks. The gray boxes disappear, but the text remains.

Of course, if you want to keep the links (for your PDF) but don’t want the gray boxes or blue text, you could change their appearance.

  1. Edit the Hyperlink Character Style to your taste, or delete it all together as explained above.
  2. Select all the entries for the imported Word hyperlinks in the Hyperlinks palette, then choose Hyperlink Options from the palette menu and change their Appearance to Invisible Rectangle.

12 Responses discussing this post. Add yours below.

  1. February 26th, 2007 • 4:06 pm • Link

    In case of needing the links for a PDF, don’t forget to specify the options to include hyperlinks, because no ID preset has this box checked.

  2. Kazimierz Kapusniak
    February 26th, 2007 • 5:07 pm • Link

    One quick and easy way to get rid of all your hyperlinks (and their formatting) in Word is to ctrl-A to select all and then ctrl-6 (not on the numeric keypad). Saves me a lot of messing about!

  3. February 26th, 2007 • 6:56 pm • Link

    Or, select all hyperlinks in the palette, click “Hyperlink Options” from the fly-out menu, and set the appearance to “invisible rectangle” to keep the links without the box in PDF format. That’s what we do in MDJ.

    Our true Word-ID annoyance is that after six years, InDesign still botches importing Word hyperlinks that have #anchors in them. It gives the text the “Hyperlink” character style, but it does not actually create a hyperlink with the URL, so you get blue text (or whatever your style mandates) with nothing behind it. Even Mac VB in Office 2004 can get to these links, so it’s baffling why InDesign can’t after all this time.

  4. February 27th, 2007 • 3:14 pm • Link

    Thank you, Kazimierz, Ctrl-6 (Command-6 on a Mac) is fantastic! What is that doing, simply removing links in Word? Is it a shortcut for a menu command (which)?

  5. Kazimierz Kapusniak
    February 27th, 2007 • 4:50 pm • Link

    I’m not sure whether it’s a menu command or not to be honest, it’s just something that I got told a while back by a colleague!

    But yeah, all it seems to do is remove all the stuff that tells Word it’s a hyperlink, leaving you with just the text.

  6. Alfred Langen
    February 27th, 2007 • 5:43 pm • Link

    Thank-you Kazimierz!

    I have used the save as function creating a text file. With Word 2003, I can save it as an ASCII file which replaces those smart quotes and dashes with ascii equivalents.

  7. mbh
    March 10th, 2007 • 5:02 am • Link

    We recently upgraded to InDesign from PageMaker. Sometimes when I save a new ad as an EPS, it won’t open in the Preview window as a pdf and when placed in Quark it’s just an empty box. Other times it works fine. We receive ad copy by email and save it as text to place in the ad format. Could it be something there or a font problem??

  8. January 17th, 2008 • 7:59 pm • Link

    Thanks SOOOO much for the hyperlink removal tutorial! I got rid of the blue lines but could not, for the life of me, find the menu to delete the “ruled box” bugger. (I only started working in InDesign a year or so ago, being a lifelong Quark user.)

  9. February 12th, 2008 • 9:19 am • Link

    Useful! I was scratching my head over this… Couldn’t find that hyperlink window in InDesign on my own :D
    The cmd-6 shortcut in Word was also really useful!

  10. March 17th, 2008 • 7:50 pm • Link

    What if I want to *add* formatting to hyperlinked text? I’m starting the process of adding hyperlinks to a long document and I’m trying to figure out if there’s a way to automatically apply a hyperlink character style to all hyperlinks *without* manually selecting the text and applying the style. It seems like there should be a menu option in the hyperlinks panel for that kind of thing. Ideas?

  11. Maria N
    May 30th, 2008 • 4:14 pm • Link

    This may be old news for ID CS3 users, but I just discovered that in the View menu, you can select Hide Hyperlinks if you want to get rid of the gray boxes. This is much easier than before!
    The link to the url is retained when exported to PDF (provided the text is placed, not copied).

  12. May 12th, 2009 • 7:13 am • Link

    In theory, you can create a character style named “Hyperlink” and choose whatever formatting you want for it. When you place a Word doc containing hyperlinks, those will be automatically assigned to the newly created “Hyperlink” Indesign character style.
    That’s what I did, because I want the text to look exactly the same as any regular text, BUT I don’t want to have hyphenated websites, like http://www.ya-hoo.com at the end of my lines. So I checked “No break” attribute on my “Hyperlink” character style.

    Now all sounds good, BUT as I said in the beggining, it all works only in theory (and InDeisgn CS2), not in InDesign CS4. For some reason, when I place the text, the character style doesn’t apply to the text.

    If anybody has ideas why, please drop me a line or comment.

    Thanks

Subscribe to the Discussion

Get the ongoing discussion surrounding "Cleaning Up Hyperlinks from Word Text" delivered to you. Click here to subscribe via RSS.

Leave a Reply

You can use limited HTML tags, such as <em></em> for emphasis/italics and <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

InDesignSecrets reserves the right to edit and/or remove posts and comments.