A
asaf lahav
Hi all,
I had just encountered a strange exception on my VB.NET outlook XP addin.
I'm handling the Add and Change events of the outlook default calendar.
And in some situations I'm getting this exception:
"System.InvalidCastException: QueryInterface for interface
Microsoft.Office.Interop.Outlook._AppointmentItem failed.
at Microsoft.Office.Interop.Outlook.AppointmentItemClass.get_BusyStatus()
at SESchedulerAddIn.Connect.m_calendarAppointmentItems_ItemChange(Object
Item) in C:\Work\Mercury\SE
Scheduler\Development\SEScheduler\SESchedulerAddIn\Connect.vb:line 1557"
The code that triggers this exception is functioning well... but when I
sometimes change fields on an appointment, it fires that exception.
The Code section which throws the exception:
If (TypeOf (Item) Is Outlook.AppointmentItem) Then
Dim appt As Outlook.AppointmentItem = CType(Item, Outlook.AppointmentItem)
If Not appt.BusyStatus = Outlook.OlBusyStatus.olTentative Then
'here I do something that doesn't have anything to do with the outlook
object.
End If
If Anyone has any idea... (and I do mean any... because I'm out) Please
HELP!
Asaf Lahav
I had just encountered a strange exception on my VB.NET outlook XP addin.
I'm handling the Add and Change events of the outlook default calendar.
And in some situations I'm getting this exception:
"System.InvalidCastException: QueryInterface for interface
Microsoft.Office.Interop.Outlook._AppointmentItem failed.
at Microsoft.Office.Interop.Outlook.AppointmentItemClass.get_BusyStatus()
at SESchedulerAddIn.Connect.m_calendarAppointmentItems_ItemChange(Object
Item) in C:\Work\Mercury\SE
Scheduler\Development\SEScheduler\SESchedulerAddIn\Connect.vb:line 1557"
The code that triggers this exception is functioning well... but when I
sometimes change fields on an appointment, it fires that exception.
The Code section which throws the exception:
If (TypeOf (Item) Is Outlook.AppointmentItem) Then
Dim appt As Outlook.AppointmentItem = CType(Item, Outlook.AppointmentItem)
If Not appt.BusyStatus = Outlook.OlBusyStatus.olTentative Then
'here I do something that doesn't have anything to do with the outlook
object.
End If
If Anyone has any idea... (and I do mean any... because I'm out) Please
HELP!
Asaf Lahav