Hi, I'm a young PHP programmer and I have a little problem: I want to start Word, Excel or Autocad using the COM function.
I found this sample but it it doesn't work as I want!
<body bgcolor="#FFFFFF" text="#000000">
<?
// 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("c:\Pippo.doc");
//closing word
$word->Quit();
//free the object
$word->Release();
$word = null;
?>
</body>
this script create the file c:\Pippo.doc with the text "This is a test..." but Word is not visible. I also try to run the script until the line "$word->Visible = 1;" but I don't see Word.
Where I mistake?
In hoping to have a reply
Laura