I have following code:
Code: Select all
com_load_typelib('Word.Application');
error_reporting(E_ALL);
$empty = new VARIANT();
$Word = new COM('word.application') or die('Unable to load Word');
$Word->Documents->Open("C:\\zert.doc");
$Word->Selection->GoTo(wdGoToBookmark,$empty,$empty,'CertNumber');
//crucial line
$Word->Selection->TypeText("some text");
$Word->Documentsї1]->SaveAs("C:\\some_file.doc");and I the heck don't know why. I am loading the constant wdGoToBookmark with the function com_load_typelib('Word.Application');, so this should work.
I don't get an error, but simply the script never stops and I get an error that apache2.exe has crashed.
do I have to install anything to use these com functions?
or why does it not work
any help very appreciated!!!
quarry