The code below will open Outlook and fill in the fields,
but it won 't send an email automatically.
How do I send an email through outlook without having to press a "send" button on Outlook, and that after a message
is sent, the "new message" window closes.
//////////////////////
Private Sub Send_Email_Click()
Dim stDocName As String
Dim myemailfieldname As String
Dim cc_field As String
stDocName = "msimn.exe"
myemailfieldname = "abc@yahoo.com"
cc_field = "abc@lycos.com"
DoCmd.SendObject , , stDocName, myemailfieldname, cc_field, , _
"NCR Issue", "Hi. A number have just been generated.", , "Clear Day"
End Sub
but it won 't send an email automatically.
How do I send an email through outlook without having to press a "send" button on Outlook, and that after a message
is sent, the "new message" window closes.
//////////////////////
Private Sub Send_Email_Click()
Dim stDocName As String
Dim myemailfieldname As String
Dim cc_field As String
stDocName = "msimn.exe"
myemailfieldname = "abc@yahoo.com"
cc_field = "abc@lycos.com"
DoCmd.SendObject , , stDocName, myemailfieldname, cc_field, , _
"NCR Issue", "Hi. A number have just been generated.", , "Clear Day"
End Sub