Tuesday 15 February 2011

How to get Outlook appointment reminders to pop up in front of other windows again using some simple VBA.

If you’ve got Windows 7 and Outlook, you may have noticed that the Outlook reminders window doesn’t pop up and steal focus any more… which means that if you’re an every window maximised kinda guy, then you don’t always notice the reminders anymore and sometimes miss meetings.
If you’ve not noticed, then you probably don’t think it’s a problem, and as it happens, this new behaviour is by design so that you don’t unknowingly dismiss the reminder window by hitting enter.
I prefer the new behaviour, but then I only really use Outlook at work and have it up in its own dedicated monitor there. Also, I'm not an every window maximised kinda guy.
If like several of my colleagues you want something like the old behaviour back, this is what I pulled out of my hatch for them - it's not elegant but you're welcome to try it and see if it works for you:


  • Create a Digital certificate for later
    • Hit Start and type ‘certificate’, select ‘Digital Certificate for VBA Projects’
    • Enter a name for your certificate
    • Done
  • Open Outlook and hit Alt + F11 to start the VBA editor.
  • In the tree on the left, expand ‘Microsoft Office Outlook Objects' and double click on ‘ThisOutlookSession’
  • Paste in this code, modifying the text in quotes to suit your preferences. Leave the quotes in.

Private Sub Application_Reminder(ByVal Item As Object)


    If TypeOf Item Is AppointmentItem Then
    MsgBox "Message text", vbSystemModal, "Message title"
    End If


End Sub

  • Sign the Macro so it will run by going to Tools > Digital Signature… and choosing the certificate you created earlier
  • Close the VBA window

This should work for most versions of Outlook. There may be better or more elegant ways of doing this and if anyone knows of one, please say so.

31 comments:

  1. Replies
    1. Alternatively you could download Outlook Reminders On Top (free program) from www.radaker.com. It just creates an icon in your system tray, and whenever it sees an Outlook reminder either minimized or behind other windows it brings it to the front for you (like the old days). But it does NOT steal the focus from whatever you're currently working on (unlike the old days). Win-win!!

      Delete
    2. This is not free. The trial is free, but the actual program is $5. Would be awesome if it was free.

      Delete
    3. This is not free. The trial is free, but the actual program is $5. Would be awesome if it was free.

      Delete
  2. Hello, firstly thanks for this great idea / workaround for the issue!

    However I have a problem with the Script as it only will run for a limited Time, it seems the script won't work after a reboot but it's still present in the VBA Editor.
    I have checked and allowed the Macro Security Settings in Outlook and allowed also, I also saw the used Certificate was not trusted and I put it int eh Trusted Root Certificate Folder... However the Script didn't work again.. and when I started my machine today from Sleep and had a Meeting in the morning it was working like a charm again. Does anyone seen this behavior too or might know an answer?

    ReplyDelete
    Replies
    1. I have the same problem. Please someone help.

      Delete
    2. Should be fine if you put it where I said - still working for me after 3+ years. Shouldn't need to faff with root certs.

      Delete
  3. Great trick. I was looking for something like this not to miss my reminders. Thanks!

    ReplyDelete
  4. Well, that's certainly an improvement. Thank you for writing this and posting it!

    Where does Microsoft get off thinking they know what is best for every single user? Apparently "the rest" of us don't have giant multimonitor setups with amplified speakers like Microsoft employees have.

    The little blinking thing at the bottom of the screen doesn't even count as a reminder. Give us the *option* to make the popup actually POP UP, Microsoft.

    ReplyDelete
  5. Thanks so much! however, if I want to get rid of this certificate, how do I remove it?

    ReplyDelete
  6. This works great. FYI, at least in Outlook 2010, you can change the "MsgBox..." line to "Application.ActiveExplorer.Activate" and it will just activate the Outlook reminder instead of creating a message box which you also have to close.

    ReplyDelete
    Replies
    1. If that takes focus then it's an improvement, I'll give it a go.

      Delete
    2. i have put this code in and it doesnt seem to work please tell me if im doing something wrong

      Private Sub Application_Reminder(ByVal Item As Object)


      Rem If TypeOf Item Is AppointmentItem Then
      Application.ActiveExplorer.Activate"Message text", vbSystemModal, "Message title"

      End If


      End Sub

      Delete
    3. I tested this. You actually use "Application.ActiveExplorer.Activate" to replace the entire line that starts with MsgBox. Do not use the quote marks. It works even if you are not in Outlook.

      I hope this helps someone else.

      Delete
    4. I've tried this and for me it puts the focus on Outlook itself. The reminder is still in the background even if the focus is already on Outlook.

      Delete
  7. How can I make the pop-up reminder "blink" and "flash"? How can I change the colour to something much more vivid? Thanks

    ReplyDelete
    Replies
    1. Not sure how to decorate the message box, but 'vb decorate message box' is probably what you want to search for

      Delete
  8. Yes, the problem with this is when you reload outlook the script no longer works. It seems that outlook only allows you to create the Vba for the session that you wrote the script for. Help, can some bright spark please help. Thanks

    ReplyDelete
    Replies
    1. Should be sticky if you put it where I said and sign it but your sysadmin may have done policy stuff (actual technical term, honest) that blocks this kind of thing

      Delete
  9. Alternatively you could download Outlook Reminders On Top (free program) from www.radaker.com. It just creates an icon in your system tray, and whenever it sees an Outlook reminder either minimized or behind other windows it brings it to the front for you (like the old days). But it does NOT steal the focus from whatever you're currently working on (unlike the old days). Win-win!!

    ReplyDelete
  10. Thank you! I am not a programmer, and was a bit leery about attempting this, but I'm so frustrated about the appointment reminders that I frequently miss, I decided to give it a try. Your instructions were very easy to follow, and my test case worked like a charm! I have high hopes for this to settle this issue for me. I would download the program from Radaker, but we're not allowed to install programs on our work computers. Nothing that says I can't put in my own (or your own) VBA code, though. :-D

    ReplyDelete
  11. Thank you. This is efficient and still works with windows 10 using outlook 2016 as well.

    ReplyDelete
  12. "'Digital Certificate for VBA Projects'" does not appear when I "Hit Start and type ‘certificate'". I'm on Window 10 Pro.

    ReplyDelete
    Replies
    1. For Windows10Pro and Office 2016, you can create a certificate by going here:
      C:\Program Files\Microsoft Office\root\Office16\Selfcert.exe

      Delete
    2. I can't install programs at work, and neither the VBA certificate nor selfcert.exe exist on my machine... I'm on Office15 and Windows 7...

      Delete
  13. I modified the Script as follows to: a) check for Task and Mail Reminders also, b) add a defaulted Cancel Button and not allow closing unless OK is selected, so you don’t accidentally close it if you were about to press the Enter key right before the Window pops up.

    "
    Private Sub Application_Reminder(ByVal Item As Object)

    If ( _
    (TypeOf Item Is AppointmentItem) _
    Or (TypeOf Item Is MailItem) _
    Or (TypeOf Item Is TaskItem) _
    ) Then

    Dim MsgBoxResult As Integer

    Do

    MsgBoxResult = _
    ( _
    MsgBox _
    ( _
    "An Outlook Reminder is awaiting snooze/dismissal! Select OK to continue.", _
    vbSystemModal + vbOKCancel + vbDefaultButton2, _
    "Attention!" _
    ) _
    ) ' -- MsgBoxResult =

    Loop Until (MsgBoxResult = vbOK)

    End If
    "

    ReplyDelete
  14. I'm running the original script and was successful in having it load every time I launch Outlook (but with a permission dialog to let the macro run). It does steal focus, so when the message box is unacknowledged, Outlook will not work in the background such as downloading new mail. So when I come back to my desk and the reminder dialog is up, I need to close the dialog then update my inbox to see any new mail that came in since the pop-up. Not perfect but is helping me not miss meetings. THANKS

    ReplyDelete
  15. I have tried this VBA code without desired success. Looking at the options and refusing to pay I came to a solution that worked fine for me. I'm using the Windows 10 Calendar app. I just added my account and sync calendar only and the alerts works perfect at the system tray just as I needed. Give it a chance, it may solve your need.

    ReplyDelete

Note: only a member of this blog may post a comment.