0

I'm simply trying to run an Access macro through the command line using the command:

"C:/Program Files (x86)/Microsoft Office/root/Office16/MSACCESS.EXE" "C:/Users/evans/Documents/Book Business/Building Reports/Book Business.accdb" /x UpdateActiveSKUs

I've looked at this question (Running Microsoft Access as a Scheduled Task) but it is not working for me because the Access window opens but is read-only; therefore the macro does not execute. The macro works if I run it myself in the program. I don't understand why it is opening as read-only because I am the only person with access to it and I've triple-checked that it's closed, even restarted the computer. How do I run a macro through the command line?

Community
  • 1
  • 1
Holly
  • 55
  • 1
  • 7
  • Are you running the command line invocation using your own Windows account, as opposed to a built-in Windows account like `LOCAL SERVICE`? "Trusted Locations" in Office are (mostly) user-specific, so opening the database from a different account could have different results depending on "who" was opening it. – Gord Thompson Mar 14 '17 at 00:18
  • Yes. Try using the folder `C:\Users\Public`. – Gustav Mar 14 '17 at 07:32

0 Answers0