Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Other Microsoft Products _ Windows Task Scheduler (win 7)

Posted by: dflak Oct 8 2018, 12:08 PM

I have a task that runs successfully with this passed as the program: "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE"
and this passed as the argument: "C:\Users\dflak\Scripts\Mail Alert.xlsm"

The program works fine and when it is done it shuts down and goes away. The issue is that if there is another workbook open, it also tries to shut it down as well. And this is because this program and the other program are opened in the same instance of excel.

So I want to run the Excel executable in a separate instance using the -x option. Where do I put the -x?

Posted by: ADezii Oct 8 2018, 01:05 PM

I believe the syntax would be:

CODE
"C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE" /x "C:\Users\dflak\Scripts\Mail Alert.xlsm"

Posted by: dflak Oct 9 2018, 07:40 AM

I made a shortcut with the correct incantation and I call that from the task scheduler. It seems to work. Today will be my first full run and I'll see how it works.