title: How to add MS outlook reminders event handlers with VBA
body: <p>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.</p>
  
  <p>I see an example at <a href="http://office.microsoft.com/en-us/outlook-help/HV080803406.aspx" rel="nofollow">http://office.microsoft.com/en-us/outlook-help/HV080803406.aspx</a> 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.</p>
  
  <h2>Update</h2>
  
  <p>Here is what I ended up adding to Outlook's ThisOutlookSession to run an external batch script when a reminder pops up.</p>
  
  <pre><code>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" &amp; " " &amp; ReminderObject.Caption
      Call Shell(Cmd, vbHide)
  End Sub
  </code></pre>