![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
Outlook 2003 and 2007 are the current versions of Outlook, those still within their support cycle.
The object browser is your friend: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, such as Reminders.ReminderFire then press F1 to see its Help topic. -- 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 ... 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. "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 |
#5
|
|||
|
|||
![]()
Now, I solve one step using below code.
but still have some questions. Is it possible to know the Appointment.EndTime using Reminder or Reminders? I only can find below property in Reminder. Application Property Caption Property Class Property IsVisible Property Item Property NextReminderDate Property OriginalReminderDate Property Parent Property Session Property if there is no endtime property in Reminder, can I make own reminder object? Or Is there any way using other object? give me some idea. thanks, soworl =============================================== Private Sub colReminders_BeforeReminderShow(Cancel As Boolean) Dim lngAns As Long Dim objRem As Reminder If colReminders.Count 0 Then For i = colReminders.Count To 1 Step -1 If Len(colReminders(i).Caption) 0 Then Set objRem = colReminders.Item(i) ' Interval = DateDiff("s", Now(), objRem.End) 'seconds -dosenot work ' MsgBox "interval=" & Interval colReminders.Remove (i) End If Next End If Cancel = True End Sub =============================================== "Sue Mosher [MVP-Outlook]" wrote: Outlook 2003 and 2007 are the current versions of Outlook, those still within their support cycle. The object browser is your friend: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, such as Reminders.ReminderFire then press F1 to see its Help topic. -- 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 ... 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. "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 |
#6
|
|||
|
|||
![]()
Item will return the item that fired the reminder, whether it's a message, appointment, task, or contact.You can then use whatever properties you need from that item.
-- 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 ... Now, I solve one step using below code. but still have some questions. Is it possible to know the Appointment.EndTime using Reminder or Reminders? I only can find below property in Reminder. Application Property Caption Property Class Property IsVisible Property Item Property NextReminderDate Property OriginalReminderDate Property Parent Property Session Property if there is no endtime property in Reminder, can I make own reminder object? Or Is there any way using other object? give me some idea. thanks, soworl =============================================== Private Sub colReminders_BeforeReminderShow(Cancel As Boolean) Dim lngAns As Long Dim objRem As Reminder If colReminders.Count 0 Then For i = colReminders.Count To 1 Step -1 If Len(colReminders(i).Caption) 0 Then Set objRem = colReminders.Item(i) ' Interval = DateDiff("s", Now(), objRem.End) 'seconds -dosenot work ' MsgBox "interval=" & Interval colReminders.Remove (i) End If Next End If Cancel = True End Sub =============================================== "Sue Mosher [MVP-Outlook]" wrote: Outlook 2003 and 2007 are the current versions of Outlook, those still within their support cycle. The object browser is your friend: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, such as Reminders.ReminderFire then press F1 to see its Help topic. "soworl" wrote in message ... 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. "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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
pop-up reminder. | vincentnyc | Outlook - Calandaring | 1 | December 7th 07 05:12 PM |
Outlook Calendar Reminder "Due In" question | primaxx | Outlook - Calandaring | 2 | May 2nd 07 08:45 PM |
reminder question | Villain | Outlook - General Queries | 2 | February 20th 07 05:07 PM |
Outlook 2003 reminder question | XYZ man | Outlook - General Queries | 4 | September 13th 06 01:17 AM |
how to set a 90 day reminder | John H | Outlook - General Queries | 2 | June 30th 06 02:35 PM |