Full Version: Including A Hyperlink In An Outlook Email
UtterAccess Forums > Microsoft® Access > Access Forms
Good Evening,
I have been using Access (via SendObject) to send data to various Outlook recipients through the on-click event property in a command button. It looks something like the following:
DoCmd.SendObject acSendNoObject, , Text, rs.Fields("Recipient1email"), rs.Fields("Recipient2email"), , "Match Report Data", "" & strBodyData & "", 0, False
In the above, the variable, strBodyData, represents a string of text from a table. (i.e. "Dear Sir, the information you requested is contained in File 2345.")
Now I would like to add a hyperlink to be included in strBodyData. (i.e. "Dear Sir, the information you requested is contained in File 2345. Here is a link to the data: http:blah-blah-blah")
However, when I include the hyperlink, it doesn't work. I've checked this forum and someone suggested using Outlook Automation to handle hyperlinks.
Can somebody provide (using the above variables), an example of how I can use Outlook Automation?
I don't think that you *need* to use automation. This line is a snippet from some of my code that gives an active hyperlink in Outlook:
strMessageText = strMessageText & "file://\\M:\Common\LS\Download\LS.cmd"

Is that the kind of thing you've tried?
The Force,
On what you have, is the entire section in quotes supposed to be the hyperlink, or is this some special syntax where I insert the hyperlink in one of the variables?
Hi, sorry for the delay in responding, I have been away.
Yes, the entire string within the quotation marks is the hyperlink.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.