0
votes

I am using the following VBA macro code from https://www.slipstick.com/developer/send-email-outlook-reminders-fires/

The only change I have made is to set the .BCC to my email address (but not shown in this post). The address I actually used is my valid address.

I do not know how to tell whether the code even executes, or whether it executes but does not do what I want. Is there a way to know whether it executes?

I actually want it to send email every time a recurring reminder fires.

Thanks.

Private Sub Application_Reminder(ByVal Item As Object)

 Dim objMsg As MailItem
  
'IPM.TaskItem to watch for Task Reminders
If Item.MessageClass <> "IPM.Appointment" Then
  Exit Sub
End If

If Item.Categories <> "Send Mail" Then
  Exit Sub
End If

Set objMsg = Application.CreateItem(olMailItem)
With objMsg
  .To = Item.Location
  .BCC = "[email protected]"
  .Subject = Item.Subject
  .Body = Item.Body
  .Send
End With
  Set objMsg = Nothing
End Sub