Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a path name in Access for Outlook

Status
Not open for further replies.

TonyS1952

Programmer
Apr 26, 2006
3
GB
I am sending an 'automatic' email to users that indicates that an important file has been loaded into a particular folder. These files can be very large so I wanted to wanted to insert a link to the file.

So I placed this 'code' in the body of the outlook message

strmessage = "file:\\datcora0s\ph_staging$\\Transformation Folder\Formatted data for export\aa01CORE.xls"
it appears as a link but as soon as it encounters a space in the path name it becomes normal text so is useless.

does anyone know how to format this string correctly so that it is surrounded by quotes and will take the entire path. I've tried chr(34) and "'" but it makes no difference.

Thanks
 
How about:

strMessage = """file:\\datcora0s\ph_staging$\Transformation Folder\Formatted data for export\aa01CORE.xls"""
 
Typed, untested:
strmessage = Replace("file:\\datcora0s\ph_staging$\\Transformation Folder\Formatted data for export\aa01CORE.xls", " ", "%20")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Merci PHV
that replace worked fine, excellent

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top