Help PHP-COM: reading Calendar events from Outlook
| From: | Garth Dahlstrom | Date: | Fri, 28 Sep 2001 17:18:10 +0000 |
| Subject: | Help PHP-COM: reading Calendar events from Outlook | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-69198@lists.php.net to get a copy of this message | ||
I haven't done any windows OLE/COM programming before, and
frankly I'm having a difficult time with the COM extensions to
PHP...
What I would like to do is create a COM object to open
Outlook and display some appointments from mine or someone
elses data (the server is my desktop w/ Outlook on it).
I've searched up and down the net for code and COM api's too
and haven't come up with much (btw, COM is a terrible search
term)... Trying to get something going with outlook is the
first step I guess, so here is some not quite working code
I stole from someone else and tried to get going:
$outl = new COM("Outlook.Application") or die("Unable to instantiate
Outlook");
$store = $outl->GetNameSpace("MAPI");
var_dump($outl, $store);
var_dump($store->Items[6]);
$t1 = "Mailbox - Dahlstrom, Garth - Outlook Today";
$t2 = "Outlook Today [Mailbox - Dahlstrom, Garth]";
$alinbox = $store->Folders[$t2]->Folders[6];
print "Box: $alinbox->Name <br>\n";
$messages = $alinbox->Items ;
$length = $messages->count ;
print "Messages: $length<br>\n";
Has anyone got any tips on how to do any type 'introspection'
on API's each COM object allow? or know where I can find
docs?
Is what I am trying to do with the calendaring stuff in outlook
even possible once I get the email stuff going? (I've seen some stuff
using CDO and CDONTS and VB)
Thanks
-Garth (Ironstorm)
Northern.CA ===--
http://www.northern.ca
Canada's Search Engine