RE: [PHP-INST] Use of COM object
| From: | William Cheung | Date: | Fri, 21 Feb 2003 23:29:23 +0000 |
| Subject: | RE: [PHP-INST] Use of COM object | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-10146@lists.php.net to get a copy of this message | ||
Use 4.3.1 solve the problem in starting up Word document but create a more
serious problem when trying to start up outlook XP. I got the following
errors
The description for Event ID ( 2000 ) in Source ( c-client ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event: c-client[1936], PHP Notice: Use of
undefined constant olMailItem - assumed 'olMailItem' in E:\Outlook.php on
line 3.
The description for Event ID ( 2000 ) in Source ( c-client ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event: c-client[1936], PHP Warning: (null)():
Invoke() failed: Type mismatch.
<b>Argument</b>: 2 in E:\Outlook.php on line 3.
The line 2 and 3 of the Outlook.php is as follow:
$objApp = new COM("Outlook.Application");
$myItem = $objApp->CreateItem(olMailItem);
This Outlook.php works totally fine in 4.2.3 version.
William
-----Original Message-----
From: William Cheung [mailto:william@databyte.com]
Sent: February 21, 2003 11:10 AM
To: PHP Support
Subject: [PHP-INST] Use of COM object
OS: Win2K
App: Office XP
PHP: 4.2.3
I am trying to use the example in the manual to create a Word COM object.
The Word document is started but there are some warnings when the COM object
is created.
Warning: Type library value emptyenum is already defined and has a different
value in C:\MSWord.php on line 3
The same warning repeated 14 times. I looked at the source and found the
line below causes the warning
$word = new COM("word.application") or die("Unable to instantiate Word");
Could anyone tell me how I could fix the problem?
William Cheung, B.Sc. MCSE MCDBA
Databyte Corp.