Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2019, 10:53 AM
k1k1 k1k1 is offline How to stop Word converting '%20' into spaces in URLs Windows 7 64bit How to stop Word converting '%20' into spaces in URLs Office 97-2003
Novice
How to stop Word converting '%20' into spaces in URLs
 
Join Date: Feb 2019
Posts: 2
k1k1 is on a distinguished road
Default How to stop Word converting '%20' into spaces in URLs


I am using Word 97-2002. When trying to create hyperlinks to URLs that contain '%20', Word keeps changing the '%20' to a space in the hyperlink (ie., in the URL that pops up if you hover over with the mouse, not in the text itself), which causes the link not to work. It doesn't matter if I go into the Hyperlink menu and paste in the original link or change the spaces back to '%20' by hand - as soon as I hit 'OK', Word converts the '%20's back to spaces, and the link won't work. Is there any way to stop it doing this?
Reply With Quote
  #2  
Old 02-05-2019, 12:59 PM
Charles Kenyon Charles Kenyon is offline How to stop Word converting '%20' into spaces in URLs Windows 10 How to stop Word converting '%20' into spaces in URLs Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Not sure why it wouldn't work. %20 is a space. Can you provide a sample URL where it does not work so I can play around?
Reply With Quote
  #3  
Old 02-05-2019, 02:05 PM
k1k1 k1k1 is offline How to stop Word converting '%20' into spaces in URLs Windows 7 64bit How to stop Word converting '%20' into spaces in URLs Office 97-2003
Novice
How to stop Word converting '%20' into spaces in URLs
 
Join Date: Feb 2019
Posts: 2
k1k1 is on a distinguished road
Default

https://www.unocha.org/sites/unocha/...%20Final_1.pdf

This link works fine. However, when it's turned into a hyperlink in Word, I can't stop it being converted to:

https://www.unocha.org/sites/unocha/files/Armed Escort Guidelines - Final_1.pdf

This second link does not work when you try to access it through Word, though if you paste it into Chrome, the browser converts the spaces back to %20 and opens the URL. Which means that Word is converting the %20s into spaces which Word itself doesn't recognise for the purpose of accessing URLS...
Reply With Quote
  #4  
Old 02-05-2019, 03:28 PM
Guessed's Avatar
Guessed Guessed is offline How to stop Word converting '%20' into spaces in URLs Windows 10 How to stop Word converting '%20' into spaces in URLs Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The problem is not actually a limitation of Word. It is a behaviour of the autoformat function in Word.

When you paste or type a string and Word recognises it as a valid URL, it automatically converts the string to a hyperlink (if your autoformat setting is turned on). This autoformat setting analyses strings of text and kicks in with a check when you add a space - therefore things after a space are not considered part of the preceding url.

But you can select any text which includes spaces and press Ctrl-K to open the insert hyperlink dialog and set that selection as a hyperlink.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 02-05-2019, 06:07 PM
Charles Kenyon Charles Kenyon is offline How to stop Word converting '%20' into spaces in URLs Windows 10 How to stop Word converting '%20' into spaces in URLs Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by Guessed View Post
The problem is not actually a limitation of Word. It is a behaviour of the autoformat function in Word.

When you paste or type a string and Word recognises it as a valid URL, it automatically converts the string to a hyperlink (if your autoformat setting is turned on). This autoformat setting analyses strings of text and kicks in with a check when you add a space - therefore things after a space are not considered part of the preceding url.

But you can select any text which includes spaces and press Ctrl-K to open the insert hyperlink dialog and set that selection as a hyperlink.

Hi Andrew,


I was hoping you were right. However here is a Word document with the link entered in the Create HyperLink dialog as well as by AutoCorrect. Same result in each.
Attached Files
File Type: docx deleteme.docx (25.4 KB, 7 views)
Reply With Quote
  #6  
Old 02-05-2019, 06:15 PM
Charles Kenyon Charles Kenyon is offline How to stop Word converting '%20' into spaces in URLs Windows 10 How to stop Word converting '%20' into spaces in URLs Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I saved as pdf and both links worked fine. Here is a screenshot from the pdf.




So, it is the hyperlink launcher in Word.
Attached Files
File Type: pdf deleteme.pdf (91.3 KB, 6 views)
Reply With Quote
  #7  
Old 02-05-2019, 08:05 PM
Charles Kenyon Charles Kenyon is offline How to stop Word converting '%20' into spaces in URLs Windows 10 How to stop Word converting '%20' into spaces in URLs Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I just tried opening the same document in Word 2007. Same problem.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I copy from word, URLs and email addresses are truncated before the first period Hills David Word 0 08-08-2018 11:36 PM
How to stop Word converting '%20' into spaces in URLs Mail Merging Unique QR URLS from Excel to Word lulu55 Mail Merge 1 03-29-2018 03:00 PM
How to stop Word converting '%20' into spaces in URLs Not press F9 to refresh URLs? ASW122 Mail Merge 5 07-14-2014 09:35 PM
How to stop Word converting '%20' into spaces in URLs URLs in citations acappella Word 3 07-24-2012 03:28 PM
Spaces After Each Word jnutella Word 0 03-04-2009 02:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft