Hi, I'm getting the same type of error. I'm running NT as admin with PWS and php version 4.0.4pl1. Any suggestions? Here's the code:
<head><title>Create a Word Document via COM</title></head><body>
<?php
echo "Before running word";
$word=new COM("Word.Application"); // or die("Cannot start word for you");
echo "After running word";
print "Loaded word version ($word->Version)\n";
$word->visible =1 ;
$word->Documents->Add();
$word->Selection->Typetext("This is a test");
$word->Documents[1]->SaveAs( "zzz.doc");
$word->Quit();
$d = dir("c:\My Documents");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
echo $entry."<br>\n";
}
$d->close();
?>
</TABLE></body>