Fatal error: Class 'COM' not found in C:\Inetpub\wwwroot\aganalysis\includes\phpdocx-pro-2.5\classes\MSWordInterface.inc on line 54
How can I fix this? Thanks!
I have tried doing the same thing as you - I have windows server 2008 with Office 2010. I run my php file and the word docx is created. The instance of Word opens (i can see it in task manager) but the PDF never shows up. I have checked permissions, etc. but cannot work out why the PDF is not created.
Any ideas?
Hello,
Can you run a simple example like?:
----------------------------------------
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
//closing word
$word->Quit();
//free the object
$word = null;
----------------------------------------
Regards.