Failed to call doc2any.exe from C# or VB.NET source code

Hi. I try to call doc2any.exe from a PHP script using your exeshell class on a 64bit Windows Server 2008 R2 system. The exeshell-x64.dll was registered successfully - but I get the following error if I start the PHP script: PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `': Klasse nicht registriert.

What can I do to solve this problem?

Thanks in advance.

Actually I'm evaluating your product and downloaded the latest version from your homepage.

Build: Nov 10 2012

The registration of the exeshell-x64.dll was successfull:

Furthermore I activated the php-extension "php_com_dotnet.dll" within the IIS-Manager.

But I still get this error.

Thanks in advance.
I suggest you may call doc2any.exe from your C# or PHP or ASP.NET or other languages directly on your Windows 2008 system, you can use CreateProcess() or Process.Start() to call doc2any.exe application.

You need also set MS Office DCOM run inside an interactive user account instead of system user account, please look at following web pages for more information,

You can also set more answers in our Knowledge Base,

If you still can not get it work, please feel free to let us know, we will assist you continue.


Thank you for the links to the different resources - but I get an error just during the calling/initialization of the EXEShell COM Library - far before doc2any/Excel/Word is started ....

My actual problem is, that I can't use your EXEShell class as mentioned on your page "CAll DOC to Any Converter Command Line from ..."

Special interest for me: calling it from a Windows 2008 Server with IIS 7 and PHP:

..."Example #6 (PHP example),

Windows 2008 Server is the 64bit system, so you need use 64bit EXEShell COM Library, you need use exeshell-x64.dll, but not the exeshell.dll library.

If you check the whole support request/thread you will find my second email and the attachments ...

Of course I'm using exeshell-x64.dll ...

Sorry for the confusion, it seems this problem is caused by permission settings on your server.

The first, please to check, can you run doc2any.exe in CMD window to convert your DOC file to PDF file properly? e.g.,

doc2any.exe D:\test.doc D:\out.pdf

Can you get it work fine in CMD window by manual?

If you can run doc2any.exe in CMD window to convert DOC file to PDF file correctly, but failed when you call it from C#, it is indicate this problem caused by permission of your IIS Server, you need give enough permission to IIS Server, e.g.,

1. Allow IIS Server to launch EXE application,
2. Allow "Everyone" user account to "Full Control" the folder where doc2any.exe exist,
3. Arrange MS Word DCOM Run inside "Administrator" user account instead of default system user account,



Once above three permission issues are resolved, I think you should no problem to call doc2any.exe or exeshell-x64.dll from C# to convert DOC files to PDF files.

If you still can not get it work on your server, you may create a remote desktop account on your test machine, send to us the user name and password, we will arrange our engineer to login your test machine and research this problem for you asap.

We suggest you may share your PC or Server by TeamViewer, TeamViewer can be downloaded from following website,

after you installed TeamViewer, please send to us your TeamViewer’s ID and Password, please also arrange your test machine running at 24 hours, after we logged into your test machine and solved the problem, we will send an email to you, then you can close the TeamViewer application.

By the way, we will release a VeryPDF Cloud API Service within a few weeks, with VeryPDF Cloud API Service, you can convert office documents to PDF files easily over the internet, you need install nothing to your Server System, you can just send a HTTP post to convert a DOC, DOCX, PPT, PPTX, XLS, XLSX, RTF file to PDF file, for example,

after you execute above URL, you will get a “” file, you can download it to your local disk easily.

You can pass “infile” parameter to “  ”, our Cloud API Service will convert it to PDF file automatically.


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

This entry was posted in DOC to Any Converter and tagged , , . Bookmark the permalink.

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!