Automated Email Macro

unclefink

Registered User.
Local time
Today, 11:05
Joined
May 7, 2012
Messages
184
I am relatively new at building access databases and thus far i've been prety successfull specifically with the help of this site.

I am not at all familiar with coding or vba so if what i'm trying to do requires it please bear with me.

In any case, I am trying to create a macro to automatically email a specific report to a specific group of individuals on a specific day of the week. Likely Monday mornings in the early am.

Another issue i'm not sure of, but the database is not likely to be open at the time this schedule is set.

Can anyone help me with step by step directions, I am a quick learner.
 
The email part is fairly easy. You can either set it up under a macro or in VBA. Both would use the SendObject method - SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject, MessageText, EditMessage, TemplateFile) see Access Help for parameter explanations.

However you will not be able to get away from some user intervention. The EditMessage parameter is used to tell Access if you want to just send as is or open the email for editing. If you say 'just send' you will get a security prompt telling the user that "Access is trying to send an email and that it may not be good" (not sure of the exact message:p).

As for automatically generating the email at the same time each Monday, you could use the form Timer event. If you have a switchboard form, that woudl be the best place to put it. OR you could check the date/time in the Open Event of every form and direct it to a sub routine to run the email.
 

Users who are viewing this thread

Back
Top Bottom