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

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
    Dim varEntryIDs
    Dim objItem
    Dim i As Integer
    Dim MailIcon As String
    dim GrowlNotifyApp As String 
    GrowlNotifyApp = """C:\Program Files (x86)\Growl for Windows\growlnotify.exe"""
    varEntryIDs = Split(EntryIDCollection, ",")
    For i = 0 To UBound(varEntryIDs)
        Set objItem = Application.Session.GetItemFromID(varEntryIDs(i))
        Set a = Application.Session.GetItemFromID(varEntryIDs(i))
        'Sending notification to Growl
  'Register the application with Growl, Open cmd run the following command, if growl is installed at default location
  'C:\Program Files (x86)\Growl for Windows>growlnotify.com /a:Outlook /r:"New Message" /ai:C:\Mail.png .
        ' Send a New Message notification
         Shell (GrowlNotifyApp + " /a:Outlook /n:""New Message"" " + _
        "/t:""New mail from " + objItem.SenderName + """ " + _
        """" + objItem.subject + """")
    Next
End 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