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

Schedule and Send a Message to People Who Have Sent You a Message


I put this solution together for a reader who goes by the name birdmanjrmd. Birdmanjrmd asked for a script that will

  • Create a new email
  • Process all the messages in a given Outlook folder. For each message
    • Add the sender’s address to the new email’s list of recipients.
    • Move the message out of the source folder to a target folder.
  • Set the new message’s subject and body.
  • Send the message.

Birdmanjrmd wants the script to run once each day, so I wrote it in VBscript. This will allow him to run it from a scheduled task using Windows Task Scheduler. Continue reading

Corporate Categories


 

In Outlook, categories are a means of organizing items into logical groups. They’re very much like Gmail’s labels, with the added benefit that you can assign each category a color. Being able to color code items is fantastic. With a quick glance you can tell what category an item belongs to. There’s one hitch though. The colors are specific to each individual. In a shared calendar that can be an issue. A category I see as green you might see as orange. Sometimes businesses and organizations, possibly even families, need everyone to see things in the same color. Imagine a business with a shared project calendar. Critical due dates all belong to the “critical” category and should appear in red. While Sally has “critical” items set to red, John has them set to blue, while Tom and Anita haven’t defined a color for “critical”, causing them to appear in white. While Outlook does propagate category names to each person’s list of categories, it does not propagate the color associated with each category.

The solution, as you might have guessed, is to use a script to synchronize a set of category names and colors to all users. The script could go in Outlook, where it would run each time Outlook starts, or it could be an external script that’s part of a login script or scheduled to run at regular intervals using Windows Task Scheduler. I’ve taken the external approach, though I’ll be glad to add a version that runs from inside Outlook if anyone is interested. The biggest advantage of an external script is that it doesn’t have to be installed on all computers if it’s called from a login script. A version that runs inside of Outlook would have to be installed on each computer.

As with many solutions, the script is actually very simple. It starts be deleting all the corporate categories (i.e. the category names and colors being enforced across all computers) from the computer. Next, it opens a file containing the corporate category definitions, reads and adds them to Outlook. The definitions are stored in a plain-text file that’s kept on a share accessible by all computers. Here’s a sample showing what the file will look like. Continue reading