When working with Outlook VSTO [VB.NET] VISUAL Studio 2019
Imports Microsoft.Office.Tools
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Outlook
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 this line (myappt = Inspector.CurrentItem) get hit when open a new Appointment.
Private Sub myappt_PropertyChange(ByVal Name As String)
MsgBox(Name)
End Sub
Private Sub myappt_Close(Cancel As Boolean)
MsgBox("Hi")
End Sub
Actually whenever the Appointment Time change I want to capture that event and want to perform some action.
Is there I'm missing some event handler for Property change
myappt = DirectCast(Inspector.CurrentItem, Outlook.AppointmentItem) AddHandler myappt.PropertyChange, AddressOf myappt_PropertyChange
– Muthu.Krish