Hi everyone,
I want to export table contents onto a word document. I have the followign soruce code.
$word = new COM("Word.Application") or die("Impossible to instantiate WordApp");
print "Word is running, version {$word->Version}\n</br>";
print "Loaded Word, version {$word->Version}\n";
$word->Visible=1;
$doc=$word->documents->Add();
$word->Selection->Text="test..";
$word->documents[1]->SaveAs("test.doc");
The internet explorer is giving me the following error.
Fatal error: Cannot instantiate non-existent class: com in /pipingt/public_html/phds-sri/ImportData.php on line 67
Can anyone help me? I am not aware of COM features in PHP. Also I made the following correction in php.ini file.
com.allow_dcom = true
Thanks in advance...
Srivats