We are running the command below to convert an excel file to a pdf from Task Scheduler. The command is in a batch file.

Hi - We are running the command below to convert an excel file to a pdf. The command is in a batch file. If we execute the batch file directly it works fine, but if we try to use Task Scheduler to execute the batch file it hangs.

Is there something special about using the office option that we need to have setup? We do have Microsoft Excel installed.

REM --> Convert the Consolidated Bill .xlsx to .pdf file
doc2any -useoffice 1 -useprinter -log log.txt "C:\EBICustom\Test\Server\PDF Invoice\SpaceX\SpaceXTemp\SpaceX_Output.xlsx" "C:\EBICustom\Test\Server\PDF Invoice\SpaceX\SpaceXTemp\ConsolidatedBill.pdf"

This seems to also only happen if we try to use Office. Below is a sample of the command in a batch file that runs fine from the Task Scheduler.

REM --> Convert the Consolidated Bill .xlsx to .pdf file
doc2any.exe -nooffice -useprinter "C:\EBICustom\Test\Server\PDF Invoice\SpaceX\SpaceXTemp\SpaceX_Output.xlsx" "C:\EBICustom\Test\Server\PDF Invoice\SpaceX\SpaceXTemp\ConsolidatedBill.pdf"

Thank you

Ashley Ryum
IT Business Analyst
------------------------------------------

image
We apologize for any inconvenience this may have caused to you, because MS Office can't be run from a System or Local System user account, so you need run MS Office from an interactive user account to convert office files to PDF files.

Please look at following web pages we hope these web pages will useful to you,

https://www.verydoc.com/others/configure%20office%20applications%20to%20run%20under%20the%20interactive%20user%20account.htm

https://www.verydoc.com/others/configure-word-and-excel.htm

https://www.verydoc.com/blog/aspnet-account-dcom-permisson-for-ms-word.html

You can also use "-nooffice" option to convert from Office documents to PDF files from Task Scheduler directly, please look at following web page for more information,

https://www.verydoc.com/blog/verydoc-doc-to-any-converter-command-line-v3-5-release-notes-convert-word-to-pdf-without-office-and-openoffice.html

VeryDOC

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!