I want convert office files (DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML) to PDF files from Windows Service


I just bought a license for doc2any_cmd. When I start doc2any_cmd manually, it seems to work ok. But I wanted to call it from a windows service, so that it converts the files in the background.

When I start doc2any_cmd through my service (runs with the same user as it works normally), I get a different behavior.

Logfile when i start through the service:
[OK] Open 'E:\webapps\R14620_Mautzusatz.docx' file successful.
[FAILED] Can't get DOC instances correctly.
[FAILED] Conversion failed, maybe you haven't MS Office or 'PDF and XPS SaveAs Add-in' installed.
Exit MS Office Add-in

when I start manually everything is ok:
[OK] Open 'E:\webapps\R14620_Mautzusatz.docx' file successful.
[OK] SaveAs to 'E:\webapps\work\R14620_Mautzusatz.pdf' file.
Exit MS Office Add-in

What does doc2any_cmd look for at this point? What does "[FAILED] Can't get DOC instances correctly." mean in this context?

thank you very much,
Thanks for your message, doc2any.exe is using MS Office to convert office files to PDF files, because MS Office can't be run from SYSTEM or Service user account, so you can't run doc2any.exe inside a Windows Service properly.

However, you can call "VeryPDFComRunCmd COM Component" from a Windows Service, and then call doc2any.exe application from "VeryPDFComRunCmd COM Component", this way will solve the MS Office's permission problem. Please refer to more information about "VeryPDFComRunCmd COM Component" from following web pages,



You can also refer to more information about how to call doc2any.exe from a Windows Service from following web pages,







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!