Hello all! I've created a macro in Access 2003 that I'm trying to run from classic ASP. The macro generates a report and automatically prints it out, and quits the application. When I run the macro alone, or from a batch file (msaccess <filespec> /X:<macroname) it works fine.
However, the goal is to have the macro run automatically from the ASP script. I've tried two options: 1), using the Server.CreateObject("Access.Application"), DoCmd.RunMacro method, and I've also tried using Windows Scripting Host.Run method to shell out and run a batch file.
Neither method works. The WSH method appears to work fine (i.e., doesn't cause any HTTP errors), but the report isn't printed. The "Access.Application" method results in HTTP error 500.
Finally, the macro is using the default printer of Adobe PDF, if that would make any difference. Anyone have any ideas?
However, the goal is to have the macro run automatically from the ASP script. I've tried two options: 1), using the Server.CreateObject("Access.Application"), DoCmd.RunMacro method, and I've also tried using Windows Scripting Host.Run method to shell out and run a batch file.
Neither method works. The WSH method appears to work fine (i.e., doesn't cause any HTTP errors), but the report isn't printed. The "Access.Application" method results in HTTP error 500.
Finally, the macro is using the default printer of Adobe PDF, if that would make any difference. Anyone have any ideas?