Hi Sue,
What do you mean the current version of outlook, 2007?
I'm using 2003.
Does that mean there is no way to solve this problem?
Please, advise me.
thanks,
soworl
"Sue Mosher [MVP-Outlook]" wrote:
If you have a current version of Outlook, you'll have more options if you use events for the Reminders collection rather than Application.Reminder.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"soworl" wrote in message ...
is there any way to dismiss when Application_Reminder is called.
I need to excute some code when reminder called, then I'd like to dismiss
that reminder without clicking the dismiss button.
when below code is running, the reminder cannot dismiss coz reminder is not
visable. dismiss only can work it's visible.
How can I solve this problem?
Help me,
soworl
my code 1 ==============================
Dim ReminderClass As New Class1
Private Sub Application_Startup()
ReminderClass.init
End Sub
Private Sub Application_Reminder(ByVal Item As Object)
'DoSomething
ReminderClass.ReminderDismiss Item.Subject
End Sub
class1 ==============================
Private WithEvents myolapp As Outlook.Application
Private WithEvents colReminders As Reminders
Sub Class_Terminate()
Call DeRefExplorers
End Sub
Public Sub init()
Set myolapp = Outlook.Application
Set colReminders = myolapp.Reminders
End Sub
Public Sub DeRefExplorers()
Set myolapp = Nothing
Set colReminders = Nothing
End Sub
Public Sub ReminderDismiss(ByVal sCaption As String)
If colReminders.Count 0 Then
For i = colReminders.Count To 1 Step -1
If Len(colReminders(i).Caption) 0 Then
If colReminders(i).Caption = sCaption Then
If colReminders(i).IsVisible = True Then
colReminders(i).Dismiss
End If
End If
End If
Next
End If
End Sub