David,
Thanks for your initial reply. I not sure if I'm formatting the email
specifically for HTML. Below you can see the code I'm workding with. There
are three areas in the code that reference "lnkpath". I not sure if I
Dimensioned, set or referecect it correctly. You assistance would be
appreciated.
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim db As Database
Dim recToEmail As Recordset
Dim objOutlook As Object
Dim objEmail As Object
Dim strBody As String
Dim hypAddress As String
Dim lnkPath As String
hypAddress = "
http://www.google.com"
lnkPath = "//pwn421b2280/testdatabase"
DoCmd.Hourglass True
Set db = CurrentDb()
Set recToEmail = db.OpenRecordset("qryClosedCalls")
Set objOutlook = CreateObject("Outlook.Application")
strBody = "Test, Test, Test" & vbCrLf & hypAddress & vbCrLf & lnkPath
While Not recToEmail.EOF
If Not IsNull(recToEmail("Contact_Email")) Then
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = recToEmail("Contact_Email")
.Subject = "Test Email"
.Body = recToEmail("CONTACTFullName") & vbCrLf & strBody
.Save
End With
End If
recToEmail.MoveNext
Wend
recToEmail.Close
Set recToEmail = Nothing
Set objOutlook = Nothing
Set myMessage = Nothing
DoCmd.Hourglass False
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
Mike
: