4

I want to extend MS Outlook so that when a calendar reminder pops up, I can run a VBA hook that can run an external program (like a batch script). In my case, I want to "forward" the reminder to a Linux desktop since I work in both environments and I don't always have the Windows desktop visible.

I see an example at http://office.microsoft.com/en-us/outlook-help/HV080803406.aspx and have opened VBA Developer view in MS outlook 2010 and inserted a class module and added that VBA code, but I do not see how to activate this code - when a reminder pops up, this code is not activated.

Update

Here is what I ended up adding to Outlook's ThisOutlookSession to run an external batch script when a reminder pops up.

Public WithEvents objReminders As Outlook.Reminders

Private Sub Application_Startup()
    Set objReminders = Application.Reminders
End Sub

Private Sub objReminders_ReminderFire(ByVal ReminderObject As Reminder)
    Cmd = "C:\path\to\my\reminder-hook.cmd" & " " & ReminderObject.Caption
    Call Shell(Cmd, vbHide)
End Sub
djb
  • 4,930
  • 1
  • 34
  • 37

1 Answers1

3

Put it in the "ThisOutlookSession" module and restart Outlook.

Also, ensure that macros are enabled in Outlook settings.

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
  • Works for me. Note that one must also enable macros in Outlook; that's a different issue. – djb Aug 15 '11 at 17:14