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.
Customer
--------------------------------------
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,

http://www.verydoc.com/others/configure-word-and-excel.htm
http://www.verydoc.com/others/configure%20office%20applications%20to%20run%20under%20the%20interactive%20user%20account.htm

How to make IIS7 play nice with Office Interpol,
http://www.verydoc.com/blog/how-to-make-iis7-play-nice-with-office-interop.html

ASP.NET account DCOM permission for MS Word,
http://www.verydoc.com/blog/aspnet-account-dcom-permisson-for-ms-word.html

Microsoft Excel Application entry missing in DCOMCNFG,
http://www.verydoc.com/blog/microsoft-excel-application-entry-missing-in-dcomcnfg.html

VeryPDF

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!