klg
07-11-2018, 08:55 AM
Hi there,
I would like to send a birthday email automatically. I found a webpage with instructions where an email gets sent when you dismiss the reminder, but the code doesn't work and the author doesn't seem to be responding. Here is the link https://www.extendoffice.com/documents/outlook/1567-outlook-send-schedule-recurring-email.html
Here the code, I cannot get the email to send. The reminder pop's up, but doesn't send.
Private Sub Application_Reminder(ByVal Item As Object)
Dim xMailItem As MailItem
On Error Resume Next
If Item.Class <> OlObjectClass.olAppointment Then Exit Sub
If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
Set xMailItem = Outlook.Application.CreateItem(olMailItem)
With xMailItem
.To = Item.Location
.Subject = Item.Subject
.Body = Item.Body
.Send
End With
Set xMailItem = Nothing
End Sub
I would like to send a birthday email automatically. I found a webpage with instructions where an email gets sent when you dismiss the reminder, but the code doesn't work and the author doesn't seem to be responding. Here is the link https://www.extendoffice.com/documents/outlook/1567-outlook-send-schedule-recurring-email.html
Here the code, I cannot get the email to send. The reminder pop's up, but doesn't send.
Private Sub Application_Reminder(ByVal Item As Object)
Dim xMailItem As MailItem
On Error Resume Next
If Item.Class <> OlObjectClass.olAppointment Then Exit Sub
If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
Set xMailItem = Outlook.Application.CreateItem(olMailItem)
With xMailItem
.To = Item.Location
.Subject = Item.Subject
.Body = Item.Body
.Send
End With
Set xMailItem = Nothing
End Sub