Growl Notifications for MSOutlook (Any Version)

Growl is very good tool for local and remote notifications, we can compare it with libnotify in Linux plus growl is already available on multiple platforms, So now I want to use it with Microsoft Outlook to notify me when new email arrives, but unfortunately there is no Add-on available for growl after Outlook 2007 onwards, so I did the work for myself, basically it is too simple to write a procedure in VBA for Office (Macros) but the only drawback is that you need to allow macros (security involved) OR sign it with Digital Certificate (money involved)

So less talk more action 🙂 , Install Growl for Windows from this link.
Open outlook and Press Alt+F11 to open Visual Basic for Application (VBA) Editor

01Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
02    Dim varEntryIDs
03    Dim objItem
04    Dim i As Integer
05    Dim MailIcon As String
06    dim GrowlNotifyApp As String
07    GrowlNotifyApp = """C:\Program Files (x86)\Growl for Windows\growlnotify.exe"""
08    varEntryIDs = Split(EntryIDCollection, ",")
09    For i = 0 To UBound(varEntryIDs)
10        Set objItem = Application.Session.GetItemFromID(varEntryIDs(i))
11        Set a = Application.Session.GetItemFromID(varEntryIDs(i))
12        'Sending notification to Growl
13  'Register the application with Growl, Open cmd run the following command, if growl is installed at default location
14  'C:\Program Files (x86)\Growl for Windows>growlnotify.com /a:Outlook /r:"New Message" /ai:C:\Mail.png .
15        ' Send a New Message notification
16         Shell (GrowlNotifyApp + " /a:Outlook /n:""New Message"" " + _
17        "/t:""New mail from " + objItem.SenderName + """ " + _
18        """" + objItem.subject + """")
19    Next
20End Sub

That’s it, you just need to download the Mail icon from this link and save it at C:\ (you can change the location on your drive and can change the icon but update the line /ai:C:\Mail.png)


  1. Henry says:

    This script works like a charm and does the work well – thanks for sharing!

  2. Kathy says:

    I’m getting the following error when running the command:

    C:\Users\Kathy>C:\Program Files (x86)\Growl for Windows>growlnotify.com /a:Outlo
    ok /r:”New Message” /ai:C:\Mail.png
    ‘C:\Program’ is not recognized as an internal or external command,
    operable program or batch file.

    Any ideas?

  3. Babar Shafiq says:

    Like the code sample in my post
    GrowlNotifyApp = “””C:\Program Files (x86)\Growl for Windows\growlnotify.exe”””

    • Manuel says:

      Thank a lot.

      If possible and not very difficult, how it would be done to open each email when you click on the corresponding Growl email notification ?.

      Sorry for my English.

      • Babar Shafiq says:

        Possible,
        We need to search the email with subject in INBOX and Open the searched email!
        We can also add, Reply option in the Growl notification

        im olApp As Outlook.Application
        Dim olNs As Namespace
        Dim Fldr As MAPIFolder
        Dim olMail As Variant
        Dim i As Integer

        Set olApp = New Outlook.Application
        Set olNs = olApp.GetNamespace("MAPI")
        Set Fldr = olNs.GetDefaultFolder(olFolderInbox)
        i = 1

        For Each olMail In Fldr.Items
        If InStr(olMail.Subject, "Subject_we_already_have_in_growl_notification") <> 0 Then
        olMail.Display
        i = i + 1
        End If
        Next olMail
        End Sub

Leave a Reply