Closed anoopkrishnak closed 3 years ago
hi @anoopkrishnak, looks like you're running into this issue: https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler
the consensus seems to be "Microsoft doesn't support running Office COM components in non-interactive sessions" this answer in particular seems like an easy (but perhaps unsupported) fix: https://superuser.com/a/655458
Closing this issue but feel free to continue the conversation if there's any changes that need to be made to docx2pdf!
Yes. I was using the workaround provided on the same link (https://superuser.com/a/655458) to resolve the issue on Dev environment but there is huge risk in using workaround as permanent fix. Is there any other ways to resolve the issue as permanent solution?
Hi
Python script couldn't open the word file while running from the scheduler task. It return null value but the same script is working when the script is executed from Command Prompt.
Calling the method convert(source, destination)
Error come from the method def windows(paths, keep_active): doc = word.Documents.Open(str(docx_filepath))