Re: how to email an access report automatically every month
- From: Steve Schapel <schapel@xxxxxxxxxxx>
- Date: Wed, 23 Aug 2006 20:32:59 +1200
I agree with Snake as regards setting this up as a scheduled task. However, it is not necessary, and probably not preferable, to run it via an AutoExec macro. Put it in a separate macro. In the Command Line of your scheduler, you can specify the macro, somewhat like this...
"C:\PathToAccess\Msaccess.exe" "C:\PathToDB\YourDB.mdb" /x YourMacro
However, if your default email client is Outlook, you may have a problem with a security warning, that can't be controlled from Access. If this turns out to be a problem, some people have reported success with a third-party utility http://www.contextmagic.com/express-clickyes/
Otherwise, you may have to look at another approach, e.g. Office Automation, rather than the SnedObject action. There is some good information at http://www.granite.ab.ca/access/email.htm
--
Steve Schapel, Microsoft Access MVP
SnakesPlane55 wrote:
Make sure you can launch your default e-mail program from Access if you.
have never used it to e-mail a report. To test use the File/Send
command with a report selected or displayed. If it works it should
bring create an e-mail with your report as an attachment. Then design a
macro or code using SendObject specifying your report and the
recipients. Be sure to specify No for Edit property. Make sure you have
disabled all e-mail attachment safeguards or your e-mail program will
ask for confirmation when Access attempts to e-mail an attachment. Set
up to run this code or macro in your Autoexec macro. Use Windows Task
Scheduler to start your Access database at the time you want to send
the e-mail. When the task runs it will open the database and send the
e-mail. You will probably have to close the database before the task
will run again. You may be able to use a command line batch script to
open and close the database. If so, you can use the Task Scheduler to
run the batch script.
- References:
- Re: how to email an access report automatically every month
- From: SnakesPlane55
- Re: how to email an access report automatically every month
- Prev by Date: Re: how to email an access report automatically every month
- Next by Date: Re: Linking two tables via a third table
- Previous by thread: Re: how to email an access report automatically every month
- Next by thread: Re: how to email an access report automatically every month
- Index(es):
Relevant Pages
|