View Single Post
 
Old 01-10-2017, 01:22 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could clean up most cases by right-clicking on the hyperlinks, choosing 'Edit Hyperlink' and pressing OK.

Alternatively you could press Alt-F9 to expose the document's field codes, for which hyperlinks will mostly look something like:
{ HYPERLINK "https://www.msofficeforums.com/word/33680-spaces-inside-fieldcode-curly-braces.html" }
then using a wildcard Find/Replace, where:
Find = [^32](HYPERLINK "*")^32
Replace = \1
Other hyperlinks that have field codes like:
{ HYPERLINK "https://www.msofficeforums.com/word/33680-spaces-inside-fieldcode-curly-braces.html" \ o "Click Here" }
After running the foregoing Find/Replace, those will look like:
{HYPERLINK "https://www.msofficeforums.com/word/33680-spaces-inside-fieldcode-curly-braces.html"\ o "Click Here" }
Note the loss of the space before the \o. The following wildcard Find/Replace will fix those, too:
Find = (HYPERLINK "*)(\\o "*")^32
Replace = \1 \2
When you're done, press Alt-F9 to restore the display.

The advantage of the Find/Replace is that it's faster on a document with many hyperlinks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote