Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cancelling Item_Open causes crash

I am writing an office addin using c# and Microsoft.Interop libraries. When I cancel the opening of an appointment in the Item_Open event by setting the Cancel property to false, it causes Outlook to crash with an Appcrash. The crash happens when opening an appointment of a recurring series with attendees.

This is somewhat new in 2016. In 2010 and 2013 it used to work.

Has anyone any idea how to get this working in 2016?

I tried to identify the problem in my code but even the example found here (Which also works for 2016 in other regards) breaks if i just set cancel to true in the AppointmentItem open event.

Edit: I just found out this only happens if I disable the cache mode

Edit 2: I just found out this only happens in 2016 in 2019 and o365 (that were automatically updated to 2019) it seems to work again.

like image 536
knechtrootrecht Avatar asked Aug 08 '16 15:08

knechtrootrecht


1 Answers

When I cancel the opening of an appointment via setting the Cancel bool to false in the Item_Open event causes outlook to crash

To cancel the default action you need to set the Cancel parameter to true. Setting the Cancel parameter to false shouldn't prevent item from opening in the inspector window.

Make sure that no other add-ins are enabled in Outlook.

like image 192
Eugene Astafiev Avatar answered Oct 12 '22 02:10

Eugene Astafiev