COM and php.... Several issues....
| From: | jeremy spielmann | Date: | Wed, 06 Mar 2002 20:17:20 +0000 |
| Subject: | COM and php.... Several issues.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87512@lists.php.net to get a copy of this message | ||
I've read through most of the documentation on how to use COM to create MS Word documents via
PHP, but I'm still having some issues that I can't seem to find any help on.
CODE:
<?
$word=new COM("word.application") or die("Cannot start MS Word");
print "Loaded word version ($word->Version)\n";
$word->visible = 1 ;
$word->Documents->Add();
$word->Selection->Typetext("This is a test");
?>
RETURNS:
Loaded word version (9.0)
Warning: Invoke() failed: Exception occurred. Source: Microsoft Word Description: Could not open
macro storage. in C:\Inetpub\wwwroot\php\word.php on line 6
I've looked on MS's website and have adjusted the DCOMCNFG.cfg as below:
1. Microsoft Word Document
2. Default Access Permission (INTERACTIVE / IUSR_NT-BOX)
2.Default Launch Permissions (INTERACTIVE / IUSR_NT-BOX)
3. Default Config. Permissions (INTERACITVE /IUSR_NT-BOX)
I really don't know what else I'm doing wrong...I've been trying to get this to work
for the last two days and it seems like and endless loop!!
Any help would be appreciated..
Jeremy