Re: strings chopped in half using COM objects

From: Date: Fri, 09 Nov 2001 16:35:33 +0000
Subject: Re: strings chopped in half using COM objects
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-10321@lists.php.net to get a copy of this message
I posted a fairly lengthy description of the solution to this problem (or at least getting a handle on understanding it) about two weeks back. You might search through the archives for it. But a cursory glance over your code might lead me to believe that you need () instead of [] (function call) on item(). Then I am sure you will need to split your "ported VB code" into two lines. Probably something like: $Item = $word->Tasks->Item($i); echo $Item->Name; will be closer to working. Alan. ----- Original Message ----- From: "Giuseppe D'Ambrosio" <boltthrower@libero.it> To: <php-windows@lists.php.net> Sent: Friday, November 09, 2001 11:26 Subject: [PHP-WIN] strings chopped in half using COM objects > On Thu, 08 November 2001, "Alan Brown" wrote: > > > > > I just grabbed the very latest from CVS (which seems to have a label of > > 4.2.0-dev) and the problem appears to have been repaired. > > > > > ok, thanx very much, Alan! > > I've now another question: how to access a property defined as "function"? > > eg., $word->Tasks->Item[$i] in this snip: > > > $word=new COM("word.application") > $ntask= $word->Tasks->Count; //gets number of tasks > > for ($i=0; $i<= $ntask; $i++ ) { > echo $word->Tasks->Item[$i]->Name; > } > > (I get " 'Item' is not a property ") > > neither com_get seems to work.. > > > thanks, > --giuse > > > ________________end_of_mail_________________________ > > Find the best deals on the web at AltaVista Shopping! > http://www.shopping.altavista.com > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.windows (#10321) next »