C
Chris S.
I'm trying to tune a VBA in Outlook 2003 that I started months ago. I
can get the macro to work using the Application_Reminder within
ThisOutlookSession, but I can't figure out how to trap the
ReminderFire or ReminderRemove. There are a lot of examples I've
found for Application_Reminder, but very few on the other two. I
tried both DIM and PUBLIC on the Class module, neither made a
difference. Any help with code would be great!
<<ThisOutlookSession>>
Dim WithEvents objReminders As Outlook.Reminders
Dim WithEvents olApp As Outlook.Application
Dim WithEvents objRems As Outlook.Reminders
-------------------
Private Sub Application_Reminder(ByVal Item As Object)
'Dim olApp As Outlook.Application
'Dim objRems As Outlook.Reminders
'Dim objRem As Outlook.Reminder
Set olApp = Outlook.Application
Set objRems = olApp.Reminders
Set objReminders = Application.Reminders
.....
End Sub
<<Class Modules>> <<Class1>>
Private Sub objReminders_ReminderRemove()
'Occurs when a reminder is removed from the collection
'or the user clicks Dismiss
MsgBox "A reminder has been removed from the collection."
End Sub
Private Sub olApp_ReminderFire(ByVal ReminderObject As Reminder)
'Occurs when a reminder executes
'Set objRems = Nothing
'Set objRem = Nothing
Set SafeItem = Nothing
Set olApp = Outlook.Application
Set objRems = objReminders.Reminders
Dim i As Integer
Dim Start
Dim PauseTime
....
End Sub
can get the macro to work using the Application_Reminder within
ThisOutlookSession, but I can't figure out how to trap the
ReminderFire or ReminderRemove. There are a lot of examples I've
found for Application_Reminder, but very few on the other two. I
tried both DIM and PUBLIC on the Class module, neither made a
difference. Any help with code would be great!
<<ThisOutlookSession>>
Dim WithEvents objReminders As Outlook.Reminders
Dim WithEvents olApp As Outlook.Application
Dim WithEvents objRems As Outlook.Reminders
-------------------
Private Sub Application_Reminder(ByVal Item As Object)
'Dim olApp As Outlook.Application
'Dim objRems As Outlook.Reminders
'Dim objRem As Outlook.Reminder
Set olApp = Outlook.Application
Set objRems = olApp.Reminders
Set objReminders = Application.Reminders
.....
End Sub
<<Class Modules>> <<Class1>>
Private Sub objReminders_ReminderRemove()
'Occurs when a reminder is removed from the collection
'or the user clicks Dismiss
MsgBox "A reminder has been removed from the collection."
End Sub
Private Sub olApp_ReminderFire(ByVal ReminderObject As Reminder)
'Occurs when a reminder executes
'Set objRems = Nothing
'Set objRem = Nothing
Set SafeItem = Nothing
Set olApp = Outlook.Application
Set objRems = objReminders.Reminders
Dim i As Integer
Dim Start
Dim PauseTime
....
End Sub