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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to