This might be outside the scope of support forPro, 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\\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,