Microsoft Access macro from Windows service

J

Joe K

I'm trying to launch a process from a Windows service that runs a Microsoft
Access macro. I'm having some trouble and wondering if anyone knows whether
this is technically possible (since a service does not have a UI).

Thanks in advance.

Joe
 
P

Pat Hartman \(MVP\)

You can pass the name of the macro you want to run as an argument if you
open Access from a .bat file. For example

"C:\Program Files\Microsoft Office\Office11\MSAccess.exe" "C:\Program
Files\Microsoft Office\Office11\Samples\Northwind.mdb" /yourmacroname

Do yourself a favor and don't use spaces or special characters in your macro
name.
 
J

John W. Vinson

On Wed, 21 Mar 2007 13:23:09 -0400, "Pat Hartman \(MVP\)" <please no
You can pass the name of the macro you want to run as an argument if you
open Access from a .bat file. For example

"C:\Program Files\Microsoft Office\Office11\MSAccess.exe" "C:\Program
Files\Microsoft Office\Office11\Samples\Northwind.mdb" /yourmacroname

Do yourself a favor and don't use spaces or special characters in your macro
name.

Pat, shouldn't there be an X command line switch in there?

"C:\Program Files\Microsoft Office\Office11\MSAccess.exe" "C:\Program
Files\Microsoft Office\Office11\Samples\Northwind.mdb" /x yourmacroname

John W. Vinson [MVP]
 
P

Pat Hartman \(MVP\)

Good catch. Thanks.

John W. Vinson said:
On Wed, 21 Mar 2007 13:23:09 -0400, "Pat Hartman \(MVP\)" <please no


Pat, shouldn't there be an X command line switch in there?

"C:\Program Files\Microsoft Office\Office11\MSAccess.exe" "C:\Program
Files\Microsoft Office\Office11\Samples\Northwind.mdb" /x yourmacroname

John W. Vinson [MVP]
 

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