Re: IIS and COM

From: Date: Fri, 18 Aug 2000 18:18:30 +0000
Subject: Re: IIS and COM
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-1964@lists.php.net to get a copy of this message
Matthew Podwysocki wrote: > Warning: Invoke() failed: No description available in > D:\webroot\lib\comtest.php on line 11 > > Warning: Invoke() failed: Exception occurred. in D:\webroot\lib\comtest.php > on line 13 > > The lines it is talking about is: > $word->Documents->Add(); > and > $word->Documents[1]->SaveAs("Useless test.doc"); > > Can someone shed some light on this? Thanks! > Matt Podwysocki Looks like you need to use the com_invoke() function to call methods of the instantiated COM object... while you can get at the properties like $word->Version, try this to access the methods after instantiating object... 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. http://www.php.net/manual/ref.com.php -- Andy Hoffman Web Developer Bristol-Myers Squibb email: andy.hoffman@bms.com

« previous php.windows (#1964) next »