PDA

View Full Version : Add a meeting reminder



Artie F. Emm
05-03-2013, 10:12 AM
Hi- Did a search but couldn't seem to find it.

I found some code on the web that adds a reminder to a meeting request that arrives with no reminder set (code follows). This seems to work when I am the only person in the To: line. When I'm cc'd or there are multiple recipients this code does not work. (The reason I make this statement: I added this line: MsgBox Items.Class to the code, and the message box displays only when I am the sole recipient.)

I've tried to modify it myself but I don't have enough domain knowledge of Outlook VBA to do it. Can anyone suggest a fix?

Just found this forum- looking forward to participating. I've written Excel and Access VBA for a while, hope to be a full on participant.

Thanks,
Dave O

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private WithEvents Items As Outlook.Items

Private Sub Application_Startup()
Dim Ns As Outlook.NameSpace
Set Ns = Application.GetNamespace("MAPI")
Set Items = Ns.GetDefaultFolder(olFolderInbox).Items
End Sub


Private Sub Items_ItemAdd(ByVal Item As Object)
On Error Resume Next
Dim Meet As Outlook.MeetingItem
Dim Appt As Outlook.AppointmentItem

If TypeOf Item Is Outlook.MeetingItem Then

Set Meet = Item

Meet.ReminderSet = True
Meet.ReminderMinutesBeforeStart = 15
Meet.Save

Set Appt = Meet.GetAssociatedAppointment(True)

If Not Appt Is Nothing Then
Appt.ReminderSet = True
Appt.ReminderMinutesBeforeStart = 15
Appt.Save
End If
End If
End Sub