automate the process of sending emails from MS Access

I would like to be able to send colleagues an email reminder about their annual review.

I have set up the timer routine and selected the appropriate people to receive the email but when i run my routine which uses

    DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, -1

it generates the first email but then waits until I manually press the send button before it generates the next email.

I wanted to be able to run this overnight so is there any way to bypass the manual "send" and fully automate the process?
Who is Participating?
Dale FyeConnect With a Mentor Commented:
Not with out some external app

I use vbMapi, which bypasses the Outlook security to give me the ability to do unattended emails.

I believe there is also CDO,
I believe you'd just use:
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText
NemetonaAuthor Commented:
just using DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText  made no difference as the routine paused until I had pressed the send button again.

I will have a look a vbMapi
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Dale FyeCommented:
There is also a program called ClickYes
I thought that default parameter when you don't specify -1 at the end would be 0.  Apparently the default is TRUE.  So you have to specify it with a 0 or FALSE.
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, 0
I guess mine works fine with the 0 setting because I use Thunderbird email instead of Outlook.
Dale FyeCommented:
Yes, that would probably explain it.  Since 2007 (maybe earlier), the Outlook Security has prevented SendObject from sending emails without user interaction.  This was designed to prevent malware of all types from sending emails from an infected computer.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.