Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to include a URL in word document, both as text people can read, and a link they can click. The URL has a hyphen in it. I don't want the URL to get broken across lines.

When I use a regular hyphen, the link works, but the text displayed gets broken.

When I use a non-breaking hyphen (Ctrl+Shift+-) Word removes the hyphen from the link.

When I try and manually edit the hyperlink, I can't add a non-breaking hyphen into the Text to display field using Ctrl+Shift+-.

If I was writing this is HTML I could just do:

<a href="http://www.my-link.com/">www.my&#8209;link.com</a>

How do I get Word to do the equivalent?

share|improve this question
    
Non-breaking hyphens are not supported in HTML so Word won't let you put one in the text portion of a hyperlink. –  martineau Sep 19 '12 at 18:58
add comment

1 Answer

I have an older version of Word but it has the same problem. I was able to workaround the limitation by holding down the Alt key and typing 030 on the numeric keypad then releasing the Alt Key at the spot I wanted the non-breaking hyphen. Afterwards I had to manually select and make the displayed text into a hyperlink with the proper href value. It may also be necessary or helpful to turn off the Auto-Formatting of Hyperlinks in Auto-Correct Options.

screenshot show Word not breaking a hyperlink after a hypen

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.