Good evening,
I have been using the code below to generate email from access, I now want to be able to format the email body and it seems I can do this using html tags. I have seen that you can use the .htmlbody syntax but I can't seem to be able to find where to use it my code.
Private Sub cmdSendAllocationEmail_Click()
Dim stdocname As String
Dim stEmail As String
Dim stSubject As String
Dim stbody As String
On Error GoTo ErrorHandler
If Not IsNull(Me.BIA_Email_Address) Then
stdocname = ""
stEmail = ""
stEmailcc = ""
stSubject = ""
stbody = ""
DoCmd.SetWarnings False
DoCmd.SendObject acSendNoObject, , , stEmail, stEmailcc, , stSubject, stbody, , False
DoCmd.SetWarnings True
Else: MsgBox "Sorry cannot send email"
End If
Exit Sub
ErrorHandler:
Select Case Err
Case 2501
Case Else
MsgBox Err.Description
End Select
End Sub
Any help would be much appreciated.