I've been trying very, very hard to get a scheduled task to run a macro that I've created. The macro runs a few queries then exports a report to a pdf on a daily basis. If I double click my vbscript file that I created the reports generate correctly. No prompts come up, no errors, works perfect. When I set the vbs to be launched as a scheduled task and stay logged in it works great... When no one is logged into the machine the task hangs at "running" status. I've already made sure that my code does not use any mapped drive letters. Also, I've manually set the macro security level to low before my mdb is accessed.
Any ideas, suggestions, or clues? This is driving me crazy!
Here is the vbscript I'm calling from scheduled tasks...
Also, I've made my macro autoExec to avoid having to deal with the command line parameters used to call it...
Any ideas, suggestions, or clues? This is driving me crazy!
Here is the vbscript I'm calling from scheduled tasks...
Code:
Set objLogFile = Nothing
Set objFSO = Nothing
Set objShell = Nothing
dim o
set o=createobject ("Access.Application")
o.automationsecurity=1 ' set macro security LOW.
o.opencurrentdatabase "C:\Mobile Reporting\Management Reports.mdb"
o.visible=true
o.usercontrol=true
set o=nothing
Also, I've made my macro autoExec to avoid having to deal with the command line parameters used to call it...