There is a case in Outlook programming where an Inspector object may be created and not released. The condition is when the Application_ItemSend() event is fired, and in that event the GetInspector() method is called when a Meeting Request is being sent. In this case, a new Inspector is created, and is not released. Also, the CurrentItem property on the inspector will be invalid and Outlook will return an error if you try to access it. Here is a VBA code example that can trigger the behavior:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
In this case there are a couple of workarounds.
- Attempt to call the Close() method on the Inspector that is returned.
- Attempt to move the code to the AppointmentItem_Send event for this case.
The second workaround above means that depending on what your code is doing, it may need to be changed to not listen on the Application_ItemSend event, and instead listen to the item-level Item_Send event for each item.