Syncing an Outlook Calendar to the Cloud


 

A reader named Todd commented on my post Exporting Email Info for Panic’s StatusBoard saying

David I would love to try something similar to create an iCal export at timed intervals to the cloud and then use that in Google calendar now that the sync function is not supported in google calendar….say from Outlook 2010??

Exporting the calendar info in iCal format is surprisingly easy as long as you have Outlook 2007 or later. The export is all handled via the GetCalendarExporter method of any Outlook Folder object that points to a calendar. In this case, I’m assuming that Todd wants to export his primary (i.e. default) calendar. If he wants a different calendar, then that’s possible too, but will require more code. Since Todd wants to schedule the export, I’ve written the solution in VBScript. This allows Todd to create a scheduled task using Windows Task Scheduler that will run the script at whatever interval he desires. Todd didn’t say where in the cloud the export needs to go, so I wrote the solution under the assumption that Todd can reach the cloud through a normal file share. If that’s not possible and the cloud target is only reachable via FTP or something similar, then the solution would require some additional code. Once the solution runs, Todd can subscribe to the calendar in Gmail just as he could to any other internet calendar.
Continue reading

Vacation Reminders


 

A reader named Jasmine contacted me last week with an interesting request. Jasmine’s office maintains a shared Outlook calendar used to keep track of vacations. They’d like the ability to send an employee an email a few days before they go on vacation reminding them to change their voice-mail message. Each vacation entry consists of an appointment on the shared calendar. The subject of each appointment uses the form “XXX vacation” where “XXX” is the employee’s initials. Jasmine asked if I could build something that would do this automatically. Here is the solution I put together for her.

I wrote the solution in VBScript so it can run from a scheduled task (i.e. a task in Windows Task Scheduler). When the task executes it will run the script. The script will open Outlook, connect to the shared calendar, retrieve all the appointments for the day X days from now (Jasmine will set the value of X), look through those appointments to find the vacation entries (it identifies them by the word “vacation” appearing in the subject), then create and send a reminder to each vacation entry it found. Because Jasmine’s office uses initials to identify each employee, the script uses a file Jasmine will build to match an employee’s initials to their email address.
Continue reading

Exporting Appointments from Outlook to Excel


I put this solution together for Allen, who had seen my post demonstrating how to export Outlook messages to Excel and asked if I could create a similar macro to export appointments. Allen went on to explain that his organization uses a shared calendar and that periodically he would like to export its contents to Excel. For each appointment, Allen wants to export the organizer (i.e. the person that added the appointment to the calendar), when the appointment was added, the appointment’s subject, when it starts, and who was invited. To make it a little easier for Allen, I broke “who was invited” down into two groups: required and optional attendees. The solution itself is nearly identical to the one I used to export messages.
Continue reading