Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Construct string in LISP for hyperlink path with spaces

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
jlane
834 Views, 5 Replies

Construct string in LISP for hyperlink path with spaces

I'm writing a macro that will generate a new email and create a hyperlink in the email body.  The hyperlink will be to a new file located on a network drive.

 

I've had success creating the hyperlink by constructing the string this way:

"file:M:/Network_Folder/Subfolder/NewFile.pdf"

 

I prefixed the path string with "file:".  Great.

 

My problem now is with folder names that use a space instead of an underscore.  The hyperlink stops short as soon as it reaches the first space.

 

Besides renaming the folder name (not an option for us), is there any way around this in LISP?

 

Even better would be to simplifiy the text that is displayed for the hyperlink, i.e. just the file name rather than the full path.

 

Thanks.

 

 

5 REPLIES 5
Message 2 of 6
paullimapa
in reply to: jlane

How about sorrounding it with another set of quotes:

\""file:///M:/Network_Folder/Subfolder/NewFile.pdf"\"


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 6
jlane
in reply to: jlane

Thanks for your reply Paul.

 

I tried your suggestion out, in a variety of combinations, but still no success.  Hyperlink always stops short once it reaches the first space in the path.

 

Any other ideas?

 

Thx!

Message 4 of 6
paullimapa
in reply to: jlane

What if instead of a space you use %20 as referenced here: http://www.w3schools.com/tags/ref_urlencode.asp


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 6
jlane
in reply to: paullimapa

Perfect, that did it!

 

Thanks for digging up that link Paul.  Much appreciated.

Message 6 of 6
paullimapa
in reply to: jlane

No problem...just glad that worked out for you...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost