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

Hotlink in email generated from Access Form

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
Below is the code that I have on my form that when a
checkbox is checked an email is generated. Part of this
email I want to be a hotlink to a file. The code picks
up the hotlink path but does not show it as a hotlink. When
the email is opened and I hit enter right after the hotlink
it then turns it into a hotlink. How can I make this a
hotlink without having to hit the enter key after the email
opens?

"\\abmfl2sv\omsweb\BEREA_OMSs\OMS_PENDING_APPROVAL\" & Me.OMS_Name.Value & ".pdf"

Code:
If Me.OMS_Pending_Approval.Value = True Then
'SendMail2

       Dim m As Outlook.MailItem
       Dim toEmail1 As String
       Dim toEmail2 As String
       Dim ccEmail1 As String
       Dim ccEmail2 As String
       Dim ccEmail3 As String
       Dim bccEmail1 As String
       Dim SL As String, DL As String
       SL = vbNewLine
       DL = SL & SL

Set O = CreateObject("Outlook.Application")
Set m = Outlook.CreateItem(0)
toEmail1 = Me.SOE_Worker.Value & "@nmhg.com"
'ccEmail1 = "abcallen@nmhg.com; abchill@nmhg.com; abkperma@nmhg.com"
'ccEmail2 = DLookup("LoginName", "ChangeFormUserNameTbl", "ActualName='" & Me.EcnBomAnalystAssigned & "'") & "@nmhg.com"
'ccEmail3 = ""
bccEmail1 = "abajacks@nmhg.com"

m.To = toEmail1
m.CC = ccEmail1 & ";" & ccEmail2
m.BCC = bccEmail1
m.Subject = "Form #" & Me.Form__.Value & " OMS Needs Approved"
m.Body = "SOECode:=" & Me.SOE_Code & SL & _
       "Process:=" & Me.Process.Value & SL & _
       "SOE Worker:=" & Me.SOE_Worker.Value & SL & _
       "Date Changed:=" & Me.Date_Change & SL & _
       "Date Needed:=" & Me.soe_date_needed & SL & _
       "What was changed:=" & Me.What_Changed & DL & _
       "Please try and approve this OMS withing 24 hours, with the maximum being 48 hours! Thank You." & DL & _
       "\\abmfl2sv\omsweb\BEREA_OMSs\OMS_PENDING_APPROVAL\" & Me.OMS_Name.Value & ".pdf" & DL & _
       "Thank You" & DL & _
       DLookup("ActualName", "tblUserNameActualName", "UserName='" & GetCurrentUserName() & "'")
                 
m.Display

End If
 
I don't have outlook so haven't tested...Perhaps try adding # to the link. May need to play with position of pounds, quoutes and ampersands.


'#"\\abmfl2sv\omsweb\BEREA_OMSs\OMS_PENDING_APPROVAL\" & Me.OMS_Name.Value & ".pdf#'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top