read content of MS Word file using PHP
Hi All,
I would like to read the content of the MS Word File using PHP.
<?php
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "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->Release();
$word = null;
?>
Above code is not working its giving following warning !
Warning: (null)(): Unable to obtain IDispatch interface for CLSID {000209FF-0000-0000-C000-000000000046}: Call was rejected by callee
Regards
gokul
|