Running a Macro from windows

S

Secret Squirrel

Is it possible to create a macro in windows that will run some reports at a
certain time every week? I want to be able to run these reports from windows
without opening the database. Is this possible?
 
S

Steve Schapel

Secret Squirrel,

Make a macro to print your reports. Then you can use Windows Task
Manager, or a third-party schuduling utility. The command line will
probably need to follow this syntax...
"C:\PathToAccess\Msaccess.exe" "C:\PathToDB\MyDB.mdb" /x NameOfMacro
 
S

Secret Squirrel

Steve, That worked fine but is there a way to have it run without actually
opening Access? I want to run it "behind the scenes". Also, what I am trying
to do it run a macro that emails a report to certain individuals. The macro
works fine but once the macro runs it opens up an email to send but I still
need to click send. Can the send function be inicorporated into the macro?
 
S

Steve Schapel

Secret Squirrel,

As far as I know, the database has to be opened to run the macro. You
can put a Quit action as the last action in the macro, so the database
closes again after it's done. There would also probably be ways to
minimize the application on opening so that it is less noticeable, but I
can't think at the moment how to do this (but it would involve using a
VBA function).

I assume you are using the SendObject action to do the emailing? If so,
it soulds like you have the Edit Message argument set to Yes? If so,
change it to No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top