Forum


Replies: 1   Views: 6096
Com object `word.application': server execution failed
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by irishadar  · 12-03-2017 - 09:48

Hi I am using vertion 6 of phpdocx under php7.1.

I am trying to convert docx to pdf using word 2013 application.

This is the code I'm using:

<?php

require_once '../classes/CreateDocx.inc';
$docx = new CreateDocx();

print "source file is: ".'C:\phpdocx\310863.docx <br>';
print "destenation  file is: ".'C:\phpdocx\Testiris33.pdf';
$docx->transformDocxUsingMSWord('C:\phpdocx\310863.docx', 'C:\phpdocx\Testiris33.pdf');

?>

I'm getting this Error code:

Fatal error: Uncaught com_exception: Failed to create COM object `word.application': Server execution failed in C:\phpdocx\classes\MSWordInterface.inc:51 Stack trace: #0 C:\phpdocx\classes\MSWordInterface.inc(51): com->com('word.applicatio...') #1 C:\phpdocx\classes\CreateDocx.inc(5312): MSWordInterface->transformFormat('C:\\phpdocx\\3108...', 'C:\\phpdocx\\Test...') #2 C:\phpdocx\code\sample_iris.php(8): CreateDocx->transformDocxUsingMSWord('C:\\phpdocx\\3108...', 'C:\\phpdocx\\Test...') #3 {main} thrown in C:\phpdocx\classes\MSWordInterface.inc on line 51

I'm getting the same Error when using cor php code :

<?php
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
print "Loaded Word, version {$word->Version}\n";

?>

I've made all change in DCOM and allow even "EVREYONE" user to have full control,unfortunately  it is not working .

I've tested both on windows 7 and 2008 server.

does anyone encounter this problem ? any answers?

Can I open a ticket about this ?

A prompt answer will be appreciated

 

iris hadar

iaa