5

I have a long URL that contains some hyphens, and would like to include it in a Word document. Unfortunately Word sees the hyphens and creates a rather ugly line-breaking scheme.

If I replace the hyphens with nonbreaking hyphens, it looks nice, but now if someone cut+pastes the URL into a browser, it won't work because the difference between regular hyphens and nonbreaking hyphens are significant.

I don't want to rely on a hyperlink, since a printed document may be used later. Also, I can't use tinyurl or another URL-shortening server, since it's an internal URL behind our company firewall.

Is there a way adjust paragraph style to keep Word from breaking lines at regular hyphens, so that I don't have to mess with the URL? Or do I just lose here?

Jason S
  • 7,944

2 Answers2

4

Try pasting the URL then (without changing anything else) entering a shift-enter where the break would have been if Word hadn't screwed it up. Word will reformat the URL using your shift-enter as the new break point. If you place your shift-enter in the wrong place in the URL, type ctrl-z and try again. The URL will remain intact, whether you click on it in the document or cut and paste it.

ar18
  • 141
2

You can replace hyphens in a URL with %2D. When the URL is pasted into a browser, it will still work. Also, since you are removing the hyphens, Word won't wrap the line early in an arbitrary way.

Jaawn
  • 134