|
Posted by Alvaro G. Vicario on 07/24/06 19:38
*** Csaba Gabor escribió/wrote (24 Jul 2006 05:27:59 -0700):
> <?php
> $path = "c:\\path\\to\\word\\document\\mydoc.doc";
> $doc = new COM($path);
> $doc->Application->visible = true;
> ?>
According to PHP manual, COM constructor doesn't expect a file name:
com COM::COM ( string module_name [, mixed server_name [, int codepage [,
string typelib]]] )
module_name
Can be a ProgID, Class ID or Moniker that names the component to load.
A ProgID is typically the application or DLL name, followed by a period,
followed by the object name. e.g: Word.Application.
A Class ID is the UUID that uniquely identifies a given class.
A Moniker is a special form of naming, similar in concept to a URL scheme,
that identifies a resource and specifies how it should be loaded. As an
example, you could load up Word and get an object representing a word
document by specifying the full path to the word document as the module
name, or you can use LDAP: as a moniker to use the ADSI interface to LDAP.
In my computer, the code just crashes PHP interpreter.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|