I apologise for being the novice that I am, I have only been using Access and VBA for a few month. I have a database that needs a report to be e-mailed out automatically, without the user have to click send.
I have Outlook 2003 / Exchange and Access 2003. I have managed to get the e-mail to open but I would like it to send automatically. Please see code below, can anyone help?
[Private Sub cmdSend_Click()
On Error GoTo Err_cmdSend_Click
Dim stDocName As String
stDocName = "Skateboarders_rpt"
DoCmd.SendObject acReport, stDocName, , "user@Domain.com", , , "Test", "This is a Test"
Exit_cmdSend_Click:
Exit Sub
Err_cmdSend_Click:
MsgBox Err.Description
Resume Exit_cmdSend_Click]
Thanks
Chunk22
I have Outlook 2003 / Exchange and Access 2003. I have managed to get the e-mail to open but I would like it to send automatically. Please see code below, can anyone help?
[Private Sub cmdSend_Click()
On Error GoTo Err_cmdSend_Click
Dim stDocName As String
stDocName = "Skateboarders_rpt"
DoCmd.SendObject acReport, stDocName, , "user@Domain.com", , , "Test", "This is a Test"
Exit_cmdSend_Click:
Exit Sub
Err_cmdSend_Click:
MsgBox Err.Description
Resume Exit_cmdSend_Click]
Thanks
Chunk22