RE: [PHP-WIN] Can't figure out how to fix this code...please help
| From: | Scott Hurring | Date: | Fri, 17 May 2002 19:44:39 +0000 |
| Subject: | RE: [PHP-WIN] Can't figure out how to fix this code...please help | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13842@lists.php.net to get a copy of this message | ||
Well Invoke() failing can mean a few different things.
1) That you're requesting something that can't be found
2) There's a more serious error (like Outlook already
being loaded in memory a few times)
What exactly is on line 11/12 of your code?
I just finished writing PHP+COM+Excel program to automatically
populate and then print out spreadsheets, so i may be able
to help ya out... but send some more info, thanks.
---
Scott Hurring
Systems Programmer
EAC Corporation
ScottH@eac.com
Voice: 201-462-2149
Fax: 201-288-1515
> -----Original Message-----
> From: R.S. Herhuth [mailto:ronherhuth@pop.mindspring.com]
> Sent: Friday, May 17, 2002 3:42 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Can't figure out how to fix this code...please help
>
>
> This is my code:
>
>
> <?PHP
> $objApp = new COM("Outlook.Application");
> $myItem = $objApp->CreateItem("olMailItem");
> $a=$myItem->Recipients->Add("admin@purplerain.org");
> $myItem->Subject="This is a test";
> $myItem->Body="This is a Body Section now.....!";
> $myItem->Display();
> $myItem->Send();
> ?>
>
>
> This is the error I'm getting...
>
>
> Warning: Invoke() failed: Type mismatch. Argument: 2 in C:\Program
> Files\Apache Group\Apache2\htdocs\outlook\sendMail.php on line 11
>
> Fatal error: Call to a member function on a non-object in C:\Program
> Files\Apache Group\Apache2\htdocs\outlook\sendMail.php on line 12
>
>
>
>
> What did I screw up?
>
> Thanks,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>