Outlook VSTO Appointment Events RRS feed

  • Question

  • When working with Outlook VSTO [VB.NET] VISUAL Studio 2019

    Private WithEvents inspectors As Outlook.Inspectors
    Private WithEvents myappt As Outlook.AppointmentItem

    Private Sub ThisAddIn_Startup() Handles Me.Startup
            inspectors = Me.Application.Inspectors
        End Sub

    Private Sub inspectors_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) Handles inspectors.NewInspector
            If TypeOf Inspector.CurrentItem Is Outlook.AppointmentItem Or TypeOf Inspector.CurrentItem Is Outlook.MeetingItem Then
                myappt = Inspector.CurrentItem
    End If
     End Sub

    But none of the below events working.

    Actually Whenever the Appointment Time Change I want to capture that event and want to perform some action.

     Private Sub myappt_PropertyChange(ByVal Name As String)
        End Sub
        Private Sub myappt_Close(Cancel As Boolean)
        End Sub

    Please suggest

    • Edited by muthu.krish Thursday, July 23, 2020 7:15 PM Update
    Thursday, July 23, 2020 7:14 PM


  • Got the answer missing the Handler Event

    myappt = DirectCast(Inspector.CurrentItem, Outlook.AppointmentItem)
    AddHandler myappt.PropertyChange, AddressOf myappt_PropertyChange

    • Marked as answer by muthu.krish Friday, July 24, 2020 12:05 PM
    Friday, July 24, 2020 12:05 PM