I am having trouble with converting docx
to pdf
. I was using 'from win32com import client' which works correctly when I run the program, but now that I have it being run with a windows task scheduler job, it gives me an error 'NoneType' object has no attribute 'SaveAs'
.
I've been reading this may be due to the task scheduler not being able to open the Word application and run the functions correctly.
I am bummed as I feel this should be something fairly simple or already solved for but I can't find anything that can do it. I have tried from docx2pdf import convert
but that doesn't work either as it requires the user to be logged in and Word to be there.
It won't work as an unattended script. I have tried pypandoc
but am having trouble installing it as when I run it it says no pandoc
was found (I already pip installed it..).