RE: Re: PHP + COM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I didn't see if this was answered yet.  This is something I'm interested in as well, so if anyone has any good information on using PHP with COM objects, that'd be great.   Specifically I want to do some things with Microsoft MapPoint.

This should work, just in the context of instantiating Word and showing it (making it 'visible'):

----------
$objapp = new COM("word.application") or die("Unable to instanciate mappoint");
$objapp -> Activate;
print "Loaded Word, version {$objapp->Version}\n";
$objapp -> Visible = True;
$objapp->Quit() or die("Quit didn't work");

# Quit does seem to work, but still get the DIE message for some reason
----------

I'm a little hazy on using objects with PHP, but to access any MS apps via COM, just change "word.application" to "mappoint.application" or whatever the name of the MS app is.   Beyond that, I need to actually make some time to figure out how to convert VBA scripts to PHP COM calls to make all this work the way I want it to.


Good luck Cleber!

-TG

> -----Original Message-----
> From: Cleber Tinoco Atanásio [SMTP:clebertx@xxxxxxxxxxxxxx]
> To: Svensson, B.A.T. (HKG)
> Sent: 15-3-2004 22:48
> Subject: PHP + COM
> 
> Hi Mr. B.A.T Svensson,
> 
> My name is Cleber.
> I'm Brazilian and my English is poor :).
> I didn't obtain help in e-mail list in my country.
> My doubt is related about Word.
> I type this code:
> 
> $WordApp = new COM("Word.Application") or die ("Error");
> 
> $WordApp->Visible = 1; // it does not function.
> 
> 
> Word Application don't be visible, only run in Background.
> Somebody can help me in this case?
> 
> Thanks.
> Cleber..

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux