I used your tutorial "Send an Email When You Add an Appointment to Your Calendar" for getting updates on when one of my coworkers adds an appointment to a calendar I created for our days off. Now I want to have the category "Pending" that I added to my categories added to the appointment before it sends me the email.
This is the code I have, and I would love to just add the set category to it.
This is the code I have, and I would love to just add the set category to it.
Code:
Private Sub Items_ItemAdd(ByVal Item As Object)
On Error Resume Next
If Item.Class = olAppointment Then
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.To = "email@domain.com"
.Subject = "New Appointment Entered"
.Body = "New appointment added to Employee Days Off Calendar." & vbCrLf & "Subject: " & Item.Subject & vbCrLf & " Date and time: " & Item.Start & vbCrLf & " Until: " & Item.End
'use Display instead of Send if you want to add a note before sending
.Display
End With
Set objMsg = Nothing
End If
End Sub