Originally Posted by
kvn5x4
.. I want it to send automatically WITHOUT me hitting the send button...
SendObject has an option to send without viewing hte email. Here is a VBA example. The False at the end of docmd will bypass user interaction. Not sure if the macro will have ability to adjust this or not.
Code:
Dim strSubject As String
Dim strBody As String
Dim strReport As String
Dim strTo As String
Dim strCc As String
Dim strBcc As String
strSubject = "Insert Subject Line Here"
strBody = "Insert text to be displayed in the email body"
strReport = "rptEquip"
strTo = "you@gmail.com"
strCc = ""
strBcc = "me@gmail.com"
DoCmd.SendObject acSendReport, strReport, acFormatTXT, strTo, strCc, strBcc, strSubject, strBody, False