I want to send email every time a recurring reminder fires.
I am using VBA code from https://www.slipstick.com/developer/send-email-outlook-reminders-fires/
The only change I made is to set the .BCC to my email address (not shown in this post).
I do not know how to tell whether the code executes, or whether it executes but does not do what I want. Is there a way to know whether it executes?
ADDITIONAL DESCRIPTION OF PROBLEM
I use alt-F11 to get to my VBA code. It does not show up when I try to access it as a macro.
My code used to run when a reminder fired.
I tried multiple ways to get my code to run.
I wanted to attach screen shots but I could not find out how.
I have my VBA code in both of these places:
Project 1 (VbaProject.OTM) - Microsoft Outlook Objects – ThisOutlookSession
Project 1 (VbaProject.OTM) – Modules – Module1
File > Options > Addins shows the “Microsoft VBA for Outlook Addin” in “Active Application Add-Ins”.
However, when I go to Developer tab > Com Add-Ins “Microsoft VBA for Outlook Addin” is not listed.
On that screen, I clicked Add and chose OUTLVBA.DLL from this folder: C:\Program Files (x86)\Microsoft Office\root\Office16\ADDINS To try to add it. I got this error message:
“ ’C:\Program Files (x86)\Microsoft Office\root\Office16\ADDINS\OUTLVBA.DLL’ is not a valid Office Add-in.”
“Microsoft VBA for Outlook Addin” is not listed in Developer tab > Disabled Items
I have gone to Developer tab > Macro Security. I tried the fourth option (Enable all macros), but it still did not work, so I set it back to option 2 (Notifications for digitally signed…”. That is what I had before when the code used to run.
When I go to Developer tab > Macros > Macros and create a small macro and then click Run, I get this message:
“The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros.”
I have both clicked Help and googled but not found out how to enable macros.
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 = "xxx@centurylink.net"
.Subject = Item.Subject
.Body = Item.Body
.Send
End With
Set objMsg = Nothing
End Sub