problem with DoCmd.SendObject Edit Message parameter

jrb1tx

New member
Local time
Today, 13:01
Joined
Dec 23, 2014
Messages
4
I cannot get Outlook to automatically send an email. It always opens up the email and makes me click send. I have taken this down to the bare minimum:

DoCmd.SendObject , , , "myemailaddress", , , "Test Email", "Sending test e-mail message", False

I am using Access and Outlook 2010. I am not getting any warnings or messages of any kind. It just opens up a new email message with my To, Subject, and Body filled in.

Any help is appreciated.
 
Try the following , inserting your own email address .


#Private Sub Command198_Click()

Dim strEmailAddress
strSubject = "Ypma's test"
strEMailMsg = "Hello this is a test "
strEmailAddress = "youremail@ntlworld.com"
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , strSubject, strEMailMsg, False, False
End Sub#

Hope this of use

Ypma

PS I am using microsoft reference . micorsoft outlook 14 object library
 
Last edited:
That gives the exact same result. I have an email message open in Outlook and I can click send or close it out. I didn't have any reference to the Outlook reference library, because this only uses MS Access VBA commands. I added it and tried it, but still the same result.
 
Not sure why its not working for you , did you get a warning message ?
sending a demo but its the same code as before . All you should have to do is enter you email address in place of joebloggs , click send .
 

Attachments

When I click Send Email, it opens an Outlook Message with the To: Subject: and Body filled in. There, I would have to click send again to make the message go. The Edit Message parameter is obviously set to False, which should automatically send the message. But it's not.

Any way to track down what's going wrong?
 
Confused . If you used your email address ,thats it you have received it, have you tried another email address to see if that addressee receives it ? Plus did you get awarning message before sending ? I am off now so Merry Christmas
Regards Ypma

To any other users could you test the demo and comfirm whether or ot its working .
 
I don't think you are following. With the Edit Message parameter, if it is set to True, the message should be opened up in Outlook and will allow you to edit the message before sending. If it is set to False, the message should automatically send.

For me, if I use True or False, the message is always opened up in Outlook for editing. The False value for Edit Message does not cause the message to automatically be sent.

My process is scheduled in the middle of the night, but every morning I have to log on and hit Send Message in Outlook in order for the email to actually be sent. I want the entire process to complete, including the automatic sending of the email, without any intervention on my part.
 

Users who are viewing this thread

Back
Top Bottom