Ms-Access 2007
I have built up a report and I want to send it to users as attachment to an e-mail. The e-mail is to be sent automatically at 8:00 a.m daily on weekdays, I have written the following code which does open the e-mail and attaches the report but waits to be manually sent:
Can anybody please help? Thank you, Kesh
Sub cmdSendEmail_Click()
Dim sDocName As String
Dim sSubject As String
Dim sToName As String
Dim sMsgText As String
sDocName = "Call_List_to_Send"
sToName = "abcd.efg@xyz.com "
sSubject = "Stale Call List"
sMsgText = "Good Morning, Please find attached list of calls that are stale for more than 72 hours"
DoCmd.SendObject acReport, sDocName, acFormatPDF, sToName, , , sSubject, sMsgText, False
End Sub
I have built up a report and I want to send it to users as attachment to an e-mail. The e-mail is to be sent automatically at 8:00 a.m daily on weekdays, I have written the following code which does open the e-mail and attaches the report but waits to be manually sent:
Can anybody please help? Thank you, Kesh
Sub cmdSendEmail_Click()
Dim sDocName As String
Dim sSubject As String
Dim sToName As String
Dim sMsgText As String
sDocName = "Call_List_to_Send"
sToName = "abcd.efg@xyz.com "
sSubject = "Stale Call List"
sMsgText = "Good Morning, Please find attached list of calls that are stale for more than 72 hours"
DoCmd.SendObject acReport, sDocName, acFormatPDF, sToName, , , sSubject, sMsgText, False
End Sub