Growl Notifications in Outlook 2010
One particular UI feature that I have always felt like Windows was missing when compared to Linux was a universal notification mechanism. On Linux there is libnotify, and most desktop applications that send notifications can use it. On Windows, the closest thing we have are “notification balloons.” More often than not, though, applications either don’t use them or use them poorly (including Windows itself, as admitted by Microsoft in their official Notifications documentation).
Enter Growl for Windows. Growl has (apparently) been around for a while on OS X, but is now gaining popularity on Windows. I’ve used it (and a similar utility called Snarl) a couple of times in the past, but only recently has it become stable and usable enough that I can leave it permanently installed and running on my Windows computers. Even still, there are a couple of notification features that are missing, most notably new mail notifications from Outlook 2010.
I spent a bit of time today whipping up a quick VBA script for Outlook in order to remedy that problem. Here’s how to make it work:
-
Launch Outlook 2010 and hit
Alt
+F11
on the keyboard to bring up the Microsoft Visual Basic for Application IDE. -
Click Insert > Module
-
Enter this code in the blank window on the right:
Option Explicit Const GrowlNotifyCmd As String = _ """C:\Program Files (x86)\Growl for Windows\growlnotify.exe""" Sub GrowlNotify(Item As Outlook.MailItem) Dim MailIcon As String MailIcon = Environ("LocalAppData") + "\Microsoft\Outlook\Mail.png" ' Register the application with Growl Shell (GrowlNotifyCmd + " /a:Outlook /r:""New Message"" " + _ "/ai:" + MailIcon + " .") ' Send a New Message notification Shell (GrowlNotifyCmd + " /a:Outlook /n:""New Message"" " + _ "/t:""New mail from " + Item.SenderName + """ " + _ """" + Item.Subject + """") End Sub
-
Click File > Save VbaProject.OTM
-
Close the Microsoft Visual Basic for Applications window
-
In the main Outlook window, make sure the Home ribbon tab is visible
-
Click Rules > Manage Rules & Alerts
-
Click the New Rule... button
-
Click Apply rule on messages I receive (under Start from a blank rule)
-
Click Next >
-
Click Next >; Click Yes when Outlook prompts to confirm the rule will be applied to every message
-
Scroll down in the Step 1: Select action(s) box and tick run a script
-
In the Step 2: Edit the rule description (click an underlined value) box, click a script
-
Select Project1.GrowlNotify from the Scripts box and click OK
-
Click Next >
-
Click Next >
-
In the Step 1: Specify a name for this rule box, enter
Growl Notification
-
Click Finish
-
Click OK
In order for the notifications to have an icon, you'll need to download an image and save it on your computer. I like the Mail Icon from the Sleek XP Basic set by deleket, but you can pick any icon square icon at least 64x64 px. Save it to C:\Users\<username>\AppData\Local\Microsoft\Outlook\Mail.png
, or adjust the path in the MailIcon
constant in the script above.
Edit: After a day or so, this stopped working for me. It turned out to be related to Outlook's macro security settings. In order to get it to run again, I had to add a digital signature to my macro project. You can read more about that at Digitally sign your macro project