Re: IIS and COM
| From: | Andy Hoffman | Date: | Fri, 18 Aug 2000 18:50:38 +0000 |
| Subject: | Re: IIS and COM | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1966@lists.php.net to get a copy of this message | ||
Andy Hoffman wrote:
> com_invoke($word, "Document.Add");
> com_invoke($word,"Documents[1].SaveAs","Usless_test.doc");
>
> Mind you, I've never tried these, it's just a guess. Basing this on BASIC
> information on php.net - the COM methods are not well documented.
OK, I hate it when I'm wrong... but I was wrong. The "COM_invoke" method isn't
working on my php4.
Matthew, your code (with a properly installed php4) should work... try commenting
out lines starting from the end of the script and work your way backwards... find
out where the error is occuring. The following script executes on my machine
(Apache/php4.0.2dev):
<?php
$word = new COM("word.application");
print "Loaded word version ($word->Version)\n";
$word->Visible = 1;
$res = $word->Documents->Add();
?>
Of course, this isn't working PERFECTLY... while I don't get any php errors, the
winword process that get's launched never terminates :( (can't even manually
kill the process in task list under nt)
Anyone else have more experience with the COM code???
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
office: LVL G1.2607
email: andy.hoffman@bms.com
phone: 609-252-5788