COM Functions
| From: | IThelp | Date: | Tue, 02 Jan 2001 14:09:57 +0000 |
| Subject: | COM Functions | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4731@lists.php.net to get a copy of this message | ||
I am trying to figure out how to use the COM functions in PHP. I tried the
following code for a test.
<?
$word = new COM("word.application") or die("Unable to instanciate 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("Useless test.doc");
$word->Quit();
?>
I got the following errors when the above code is ran.
Warning: Invoke() failed: No description available in
c:\inetpub\wwwroot\test.php on line 5
Warning: Invoke() failed: Exception occurred. in c:\inetpub\wwwroot\test.php
on line 7
Ryan