C
Csaba Gabor
If I do not have the indicated Word document open (on my Win XP Pro
machine with PHP 5.2), the following will open and display it:
<?php
$path = "c:\\path\\to\\word\\document\\mydoc.doc";
$doc = new COM($path);
$doc->Application->visible = true;
?>
However, there will be several identical warnings (14 in number)
associated with line 3 (the new COM line):
Warning: com::com(): Type library constant emptyenum is already defined
in C:\Morph\Demos\Dev\Word\test.php on line 3
Am I getting lucky that the doc is opened at all (and hence the
warnings are not bugs), or should this behaviour be reported? This
type of functionality works fine in vbscript:
Path = "c:\path\to\word\document\mydoc.doc"
Set doc = CreateObject(Path)
doc.Application.visible = true
Thanks,
Csaba Gabor from Vienna
PS. Note that if the doc is already opened, the above scripts will
fail.
machine with PHP 5.2), the following will open and display it:
<?php
$path = "c:\\path\\to\\word\\document\\mydoc.doc";
$doc = new COM($path);
$doc->Application->visible = true;
?>
However, there will be several identical warnings (14 in number)
associated with line 3 (the new COM line):
Warning: com::com(): Type library constant emptyenum is already defined
in C:\Morph\Demos\Dev\Word\test.php on line 3
Am I getting lucky that the doc is opened at all (and hence the
warnings are not bugs), or should this behaviour be reported? This
type of functionality works fine in vbscript:
Path = "c:\path\to\word\document\mydoc.doc"
Set doc = CreateObject(Path)
doc.Application.visible = true
Thanks,
Csaba Gabor from Vienna
PS. Note that if the doc is already opened, the above scripts will
fail.