Hi All
I have written the following code to add database link to the email. The only thing is all the text goes in 1 line only even if I use vbcr,vbnewline etc..
I have written the following code to add database link to the email. The only thing is all the text goes in 1 line only even if I use vbcr,vbnewline etc..
Code:
Public Sub SendEmail()
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Dim myLink As String
myLink = "L:\Database1.Accdb"
With MailOutLook
.To = DLookup("[Email]", "tblStaff", "[strUser]='" & NameofUser() & "'")
.Subject = FName & " needs to be signed off"
.HTMLBody = FName & " has been completed by " & DLookup("[Staff Name]", "tblstaff", "struser='" & NameofUser() & "'") & "." & vbCrLf & vbCrLf & "The Reference number is " & gRef & ". " & vbNewLine & vbNewLine & "Please click on this link to review and sign off: <a href='" & myLink & "'>Click me</a>."
End If
.sEnd
End With
End Sub