in reply to Perl with Outlook Calendar

You will have to use Win32::OLE and the Outlook Object Model, which should be documented in the MSDN. I've done this already, and if you only want to retrieve data from the Outlook Object Model, it's relatively simple as long as you stay with what Outlook delivers.

If you dare to venture into the realms of shared calendars and Exchange servers, you're in for a different bag.

Here is one node by me, discussing the basics of using Outlook via Win32::OLE, and here is a fully functional (Win32) snippet, which extracts all phone numbers from Contact Items. You would want Calendar Items instead, but the modifications are trivial as soon as you found the map of the Outlook Object Model on the MSDN.

Replies are listed 'Best First'.
Re: Re: Perl with Outlook Calendar
by chiller (Scribe) on Sep 06, 2001 at 23:09 UTC
    Speaking of Exchange, I might find myself in a situation where I have to write a script to say, make batch updates to all users and/or contacts in an Exchange db...

    What am I in for..? Can this be done? Otherwise it's importing and exporting CSV's...

      Writing to Exchange is easy as long as you can use the Outlook Object Model. When I used the Outlook Object Model to do live caller-id lookup against a contacts database of about 400 Contact Items on an Exchange (4) server, I found the Outlook Object Model to be abysmally slow for searching through all these contacts. I had (not with Perl, mind you) to turn to true MAPI, which is more or less like SQL without the ASCII command syntax, and you have to manage the result tables yourself. MAPI has the great performance you'd expect from a relational database, but interfacing MAPI to Perl is really hard.

      To set the value of a property via the OOM, just assign to that property. As (I guess) this will be a one off job, time is not that important, and you can try to use the Outlook Object Model. Stuff you can't do with the OOM is for example change or preserve sociations between Outlook Items, as there is not much way to get at the MAPI unique item IDs.