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

Hyperlink Formatting in VBA

Status
Not open for further replies.

rossmcl

Programmer
Apr 18, 2000
128
Hi,<br>I want to use the sendobject command, but with a string in the message that is in format hyperlink format, so it will automatically open a page. At the moment when I include an http:\.... etc file, it does not underline, and just comes through as normal text on the email.<br>Any ideas would be much appreciated.<br>Regards<br><br>Ross McLanachan
 
Try this<br>Public Function EmailHyperLink()<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim stuff As String<br>&nbsp;&nbsp;&nbsp;&nbsp;stuff = stuff & &quot;Blah Blah Blah&quot; & Chr$(10)<br>&nbsp;&nbsp;&nbsp;&nbsp;stuff = stuff & &quot;<A HREF=" TARGET="_new"> & Chr$(10)<br>&nbsp;&nbsp;&nbsp;&nbsp;stuff = stuff & &quot; &quot; & Chr$(10)<br>&nbsp;&nbsp;&nbsp;&nbsp;DoCmd.SendObject acSendNoObject, &quot;&quot;, , &quot;douglasp&quot;, , , &quot;test&quot;, stuff, False<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>End Function<br><br>I added a Carriage return to the Hyperlink and e-mailed it to my self when I opened it the microsoft.com was blue underlined.<br>
 
I am trying to do it so that it opens an exe on teh C drive.<br>THought it would be the same principle, but it does not seem to work:<br><br>MsgString = &quot;Hi,&quot; & ForceReturn & ForceReturn & &quot;BLAH&quot; & GetWeekDataLastFriday() & &quot;.&quot; & ForceReturn & ForceReturn & &quot;BLAH&quot; & ForceReturn & ForceReturn & &quot;BLAH&quot; & ForceReturn & ForceReturn & &quot;C:\Program Files\PAT\PROJACT.EXE&quot; & Chr$(10)<br><br>nb. ForceReturn is chr(13)<br><br><br>ANY FURTHER HELP WOULD BE GREATLY APPRECIATED.<br><br>Ross McLanachan
 
Not sure I understand what you want?<br>You are sending and E-mail to someone and attached is a file and you want their PC to launch a .EXE program????<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you.
 
Doug,<br>I am sending a email, i want a hyperlink at the bottom of the email that will allow them to open a executable on their (on everyones) C:\<br><br>If you use the hyperlink property on a button, you can open something on the C in the same way as you open a website.<br>(i am sure you are aware of this anyway)<br><br>Any help will be much appreciated<br>Ross
 
Try using &quot;file:///C:/Folder/Program.exe&quot; for the hyperlink. <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= FreeDSL Service</a><br>[To a get FREE DSL Modem WITH FREE DSL Unlimited Internet Connection click the above link :)]
 
John,<br>Thanks for that, seems to be getting there....<br>BUT..<br>When I double click on the 'hyperlink' in the email., it says to open attachment, I must first save it.<br>(And anyway if I chose to save it (obviously not what I would want to do anyway since they all already know) it doesnt work.<br>Hmmm didnt think this was going to be so tricky.!<br>Ross<br>
 
There is no way around this. It is built in security. Is there a problem with them having to choose to Open the file? <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= FreeDSL Service</a><br>[To a get FREE DSL Modem WITH FREE DSL Unlimited Internet Connection click the above link :)]
 
They dont get an option to open it. THe message box that comes up is, to open attachment, I must first save it.<br>Obviously I dont want users to get this, i.e. be asked to save something that already exists on their C:\<br><br>If it just said 'Open' then I would be happy. <br><br>Any help much appreciated<br><br>Ross McLanachan
 
What I get when I click on a link, such as above, is a file download box, which asks &quot;What would you like to do with this file&quot; and lists the options &quot;Run this program from it's current location&quot; and &quot;Save this program to disk&quot;<br><br>If I choose to run the program from it's current location, the program opens with no problems. I am not sure what configuration you are using, what email program, what O/S etc. But I know this works for me. Sorry I couldn't have helped you any more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top