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

Need help with a File hyperlink in body of email 4

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
Program sends emails locally and I would like a hyperlink to a file in the body so they can just click it to open the pertinent document.
here is code so far

Code:
    Dim EmailRecipient As String
    Dim EmailSubject As String
    Dim EmailMsg As String
    
    EmailRecipient = DLookup("[ManagerEmail]", "[logins]", "[Employee Name] = '" & Me.Employee_Name & "'")
    EmailSubject = "Time Sheet submitted by " & Me.Employee_Name & " for Week Ending " & Me.WeekEndDate
    msg = "Time Sheet Submitted by " & Me.Employee_Name & vbCrLf
    msg = msg & " for Week Ending " & Me.WeekEndDate & vbCrLf & vbCrLf
    msg = msg & "Click here to open Managers form" & vbCrLf
    msg = msg & "\\servero2\Data Files\Task Order\TimeSheetsMan.mdb"
    EmailMsg = msg
    
    DoCmd.SendObject acSendNoObject, "", acFormatHTML, EmailRecipient, , , EmailSubject, EmailMsg, True

TIA

DougP
 
Try

msg = msg & "file://\\servero2\Data%20Files\Task%20Order\TimeSheetsMan.mdb"

You will need to send the email to test.
 
Not sure it this is where i'd post this.. i'm a newbie to this forum.. i'm doing a similar thing.. sending an email from access.. and like Doug, i'd like it to insert a hyperlink to a file.. which works fine! But, in addition to that i'd like to open a form in the access db to a specific record.. I can make a desktop shortcut that does this just fine, but can't for the life of me get it to work from an email..

CODE:
msg = Replace("file:///C:\Documents and Settings\tony\Desktop\Noble_Test.mdb /cmd C5", " ", "%20")

If I strip out the "/cmd C5" part, it opens the mdb just fine.. maybe it can't be done??(command line code)

Thanks in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top