need to send mail when remainder event caused

E

Eric Legault [MVP - Outlook]

Try the Reminder event:

Dim WithEvents myolapp As Outlook.Application

Sub Initialize_handler()
Set myolapp = CreateObject("Outlook.Application")
End Sub

Private Sub myolapp_Reminder(ByVal Item As Object)
Dim objNewEmail As Outlook.MailItem

If Item.Class <> olAppointment Then Exit Sub
Set objNewEmail = myolapp.CreateItem(olMailItem)
objNewEmail.Subject = Item.Subject
objNewEmail.Body = Item.Body
objNewEmail.To = "[email protected]"
objNewEmail.Display

Set objNewEmail = Nothing
End Sub
 
Top