Is it possible that there is a mismatch in security contexts? Try running the script or Outlook (or both) "as administrator."
I have a script that downloads a CSV from Outlook, does some things in Excel, and then sends an email out to people.
When I run it manually with Outlook open, it runs perfectly. But when I try to run it with Task Scheduler, I get this error
"com_error(-2146959355, 'Server execution failed', None, None)"
If I close Outlook and run it using Task Scheduler, it works.
My issue is that I want to run this during the workday so I don't have to remember to send it. During the workday, I always have Outlook open.
Does anyone know how to get it so that the scheduled task can run during the day with Outlook open? Any help would be appreciated!
Python program not working when run in Task Scheduler if Outlook is open