Help with automating doc2pdf.exe from a scheduled task

This might be outside the scope of support for docPrint Pro, but I thought I would ask anyway.

I am trying to create a scheduled task that will run each night to convert a bunch of Word and Excel files into PDF's.

I have a script which works very well when I run it from a command line -- basically, it is the single line:

for /f "delims=|" %%f in ('dir /b .\*.*') do "C:\Program Files\docPrint\doc2pdf.exe" -i "%%f" -o "%%~nf.pdf"

However, if I try to run this from a scheduled task, the task does not complete and no PDF's are generated. I am guessing that Word and Excel don't work when used this way.

Would you have any advice for making this work as a scheduled task?

Thanks in advance.
Thanks for your message, this is a limitation of MS Office, because MS Office can't be run from Windows Task Scheduler (or from an non-interactive user account).

However, you may arrange MS Office run inside an interactive user account to instead of default SYSTEM user account, this will make your script run properly from Windows Schedule Task.

Please refer to following web pages for more information,

How to make IIS7 play nice with Office Interpol,

ASP.NET account DCOM permission for MS Word,

Microsoft Excel Application entry missing in DCOMCNFG,


VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!