I am trying to send email from a form electronically. I have a command button called Email this report and I want to send the report to someone. I have the following script:
Private Sub Email_ECM_Report_DblClick(Cancel As Integer)
On Error Resume Next
Dim strToWhom As String
Dim strMsgBody As String
strToWhom = InputBox("john.doe@playdoh.com")
strToMsgBody = "Attached is the Enterprise Change Management Report. If you have any questions, please contact Randall Dameron at randall.dameron@cox.com"
DoCmd.SendObject , , , strToWhom, , , strMsgBox, True
End Sub
Is this the right code?
Private Sub Email_ECM_Report_DblClick(Cancel As Integer)
On Error Resume Next
Dim strToWhom As String
Dim strMsgBody As String
strToWhom = InputBox("john.doe@playdoh.com")
strToMsgBody = "Attached is the Enterprise Change Management Report. If you have any questions, please contact Randall Dameron at randall.dameron@cox.com"
DoCmd.SendObject , , , strToWhom, , , strMsgBox, True
End Sub
Is this the right code?