none
ReminderRemove event is not firing RRS feed

  • Question

  • hi

    i want to capture ReminderRemove event , which means if i clcik on Dismiss button of Reminder Dialogue box then it should fire(as provided with in outlook object model)

     

    i am using folowing code

    within Addin.vb

    Public Class ThisAddIn


        Dim ApptEventHandler As New lms

        Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
            Try
                ApptEventHandler.Initialize_handler(Me.Application)           
            Catch exc As System.Exception           
            End Try
        End Sub

    end class

     

    then with in lms class module

    Public Class lms

    Public WithEvents objReminders As Outlook.Reminders

    Public Sub Initialize_handler(ByVal Application As Outlook.Application)

    Me.objReminders = Application.Reminders

    end sub

    end class

    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.")
            'CodeSite.Send("remindner removed")
        End Sub


    above event does not seem to fire when i clcik on dismiiss butoon on Reminder dialogue box. is there any problem with above code or need to set something.

    i am using usto2005 and outlook2007

    Thanks

     

    Tuesday, July 12, 2011 4:09 PM

Answers

  • See if this helps, change your event handler declaration line to this:
     
    Private Sub objReminders_ReminderRemove() Handles objReminders.ReminderRemove

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Nitrup" <=?utf-8?B?Tml0cnVw?=> wrote in message news:a65ad6e1-86fa-44ff-862e-71590a2aae7a...

    oops!  i must paste that code correctly .

    but actually in my implementation its with in class, and event is not being handelled. so actual code is

     

    Public Class lms

    Public WithEvents objReminders As Outlook.Reminders

    Public Sub Initialize_handler(ByVal Application As Outlook.Application)

    Me.objReminders = Application.Reminders

    end sub

    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.")
            'CodeSite.Send("remindner removed")
        End Sub

    end class

    Thanks


    Ken Slovak MVP - Outlook
    Wednesday, July 13, 2011 1:38 PM

All replies

  • Your remove handler does not seem to be part of the lms class, which it has to be. Move the Private Sub objReminders_ReminderRemove() event handler into the lms class.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Nitrup" <=?utf-8?B?Tml0cnVw?=> wrote in message news:96517785-5059-4253-bd43-699d2427b427...

    hi

    i want to capture ReminderRemove event , which means if i clcik on Dismiss button of Reminder Dialogue box then it should fire(as provided with in outlook object model)

     

    i am using folowing code

    within Addin.vb

    Public Class ThisAddIn


        Dim ApptEventHandler As New lms

        Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
            Try
                ApptEventHandler.Initialize_handler(Me.Application)           
            Catch exc As System.Exception           
            End Try
        End Sub

    end class

     

    then with in lms class module

    Public Class lms

    Public WithEvents objReminders As Outlook.Reminders

    Public Sub Initialize_handler(ByVal Application As Outlook.Application)

    Me.objReminders = Application.Reminders

    end sub

    end class

    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.")
            'CodeSite.Send("remindner removed")
        End Sub


    above event does not seem to fire when i clcik on dismiiss butoon on Reminder dialogue box. is there any problem with above code or need to set something.

    i am using usto2005 and outlook2007

    Thanks

     


    Ken Slovak MVP - Outlook
    Tuesday, July 12, 2011 6:01 PM
  • oops!  i must paste that code correctly .

    but actually in my implementation its with in class, and event is not being handelled. so actual code is

     

    Public Class lms

    Public WithEvents objReminders As Outlook.Reminders

    Public Sub Initialize_handler(ByVal Application As Outlook.Application)

    Me.objReminders = Application.Reminders

    end sub

    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.")
            'CodeSite.Send("remindner removed")
        End Sub

    end class

    Thanks

    Wednesday, July 13, 2011 8:26 AM
  • See if this helps, change your event handler declaration line to this:
     
    Private Sub objReminders_ReminderRemove() Handles objReminders.ReminderRemove

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Nitrup" <=?utf-8?B?Tml0cnVw?=> wrote in message news:a65ad6e1-86fa-44ff-862e-71590a2aae7a...

    oops!  i must paste that code correctly .

    but actually in my implementation its with in class, and event is not being handelled. so actual code is

     

    Public Class lms

    Public WithEvents objReminders As Outlook.Reminders

    Public Sub Initialize_handler(ByVal Application As Outlook.Application)

    Me.objReminders = Application.Reminders

    end sub

    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.")
            'CodeSite.Send("remindner removed")
        End Sub

    end class

    Thanks


    Ken Slovak MVP - Outlook
    Wednesday, July 13, 2011 1:38 PM
  • yeah! it worked

     

    Thnak you very Much!

    • Marked as answer by Nitrup Friday, July 15, 2011 2:38 PM
    • Unmarked as answer by 许阳(无锡)Moderator Wednesday, July 20, 2011 12:59 AM
    • Marked as answer by Nitrup Friday, July 22, 2011 8:29 AM
    • Unmarked as answer by Nitrup Friday, July 22, 2011 8:29 AM
    Thursday, July 14, 2011 2:55 PM