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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink text from Access 07 to Outlook 07 email

Status
Not open for further replies.

newestAF

Technical User
Jul 9, 2009
72
US
It's been a while since I've had to post a question. Was doing good for a while. Here's the situation. From Access, I'm creating an email to send. The email has 3 hyperlinks. I can hyperlink them using .HTMLBody but since the string as a space in it, I can't get the hyperlink to navigate to the right path. The links bring them to a share drive folder which contains multiple documents. Here's some of what I got so far:

*************CODE START******************

str = str & "<html>"
str = str & "<head></head><br>"
str = str & "<body><br>"
str = str & "<br>STUFF<br>"
str = str & "<A href='\\server\path\folder>'>foldername</A><br>"
str = str & "<br>MORE STUFF.<br>"
str = str & "<br></body><br>"
str = str & "</html>"

**************CODE END***************

I've even tried using "file///". Unfortunately, changing the folder name isn't an option for me or I would have done that and been done with this by now. Again, the email 'looks' fine but the hyperlink isn't right. Thanks again.
 
the string as a space in it
I'd try something like this:
thestring = Replace(thestring, " ", "%20")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
When I hover the cursor over the hyperlink, it doesn't display the same as when I manually assign the hyperlink. It also doesn't work.
 
Looks like I figured it out. Here's what I ended up with:

**************CODE START*********************
STR = "<a href='file:////server/path/folder'>whatusersees</a>
**************CODE END***********************

Can't believe it was that simple. Thanks guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top