Reminder Add

This event occurs when a Reminder item is added to the Reminders collection. The following example changes the default reminder sound, depending on the Item class of the ReminderObject passed to the ReminderAdd event procedure. All appointment items play the Utopia sound, and all task items play the Splashsound. You cannot set the ReminderSoundFile property for Mail and Contact item follow-up flags.

Private Sub colReminders_ReminderAdd(ByVal ReminderObject As Reminder) Dim objAppt As Appointmentltem Dim objTask As Taskltem Set objltem = ReminderObject. Item Select Case objltem.Class Case olAppointment Set objAppt = objltem objAppt. ReminderOverrideDefault = True objAppt.ReminderSoundFile = "c:\sounds\utopia.wav" objAppt.ReminderPlaySound = True objAppt.Save Case olTask Set objTask = objltem objTask. ReminderOverrideDefault = True objTask. ReminderSoundFile = "c:\sounds\splash.wav" objTask. ReminderPlaySound = True objTask. Save End Select End Sub

Was this article helpful?

0 0

Post a comment