"The item has been moved or deleted."

Add-in Express™ Support Service
That's what is more important than anything else

"The item has been moved or deleted."
 
Rick Koch




Posts: 172
Joined: 2006-09-05
Error occurs very intermittently (can't be reproduced) when users click the send button. My code appears to be running in the Inspector_Activate event when the item disappears.

Here's a stack trace from the exception:

Detailed technical information follows:
---
(Inner Exception)
Date and Time: 2/9/2007 10:08:03 AM
Machine Name: JAXNBXP155
IP Address: 192.168.6.119
Current User: MPS\rcotting

Application Domain: MPS.Cosmos.OfficeIntegration.OutlookAddin.dll.manifest
Assembly Codebase: file:///C:/Documents and Settings/rcotting/Local Settings/Application Data/MPS/Cosmos Outlook Addin/AddinExpress.VSTO.DLL
Assembly Full Name: AddinExpress.VSTO, Version=2.7.2389.0, Culture=neutral, PublicKeyToken=2b3662baf831494c
Assembly Version: 2.7.2389.0
Assembly Build Date: 1/29/2007 12:34:32 PM

Exception Source: Microsoft Office Outlook
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: The item has been moved or deleted.
Exception Target Site: get_Sent

---- Stack Trace ----
Microsoft.Office.Interop.Outlook._MailItem.get_Sent()
AddinExpress.VSTO.DLL: N 00000 (0x0) JIT
MPS.Cosmos.OfficeIntegration.OutlookAddin.ADXWrapper.UpdateContext(Inspector As Inspector)
AddinExpress.VSTO.DLL: N 0079 (0x4F) IL
MPS.Cosmos.OfficeIntegration.OutlookAddin.ADXWrapper.ADXWrapper_InspectorActivate(sender As Object, inspector As Object, folderName As String)
AddinExpress.VSTO.DLL: N 0001 (0x1) IL
AddinExpress.VSTO.ADXOutlookModule.DoInspectorActivate(inspector As Object, folderName As String)
AddinExpress.VSTO.DLL: N 0008 (0x8) IL



(Outer Exception)
Date and Time: 2/9/2007 10:08:03 AM
Machine Name: JAXNBXP155
IP Address: 192.168.6.119
Current User: MPS\rcotting

Application Domain: MPS.Cosmos.OfficeIntegration.OutlookAddin.dll.manifest
Assembly Codebase: file:///C:/Documents and Settings/rcotting/Local Settings/Application Data/MPS/Cosmos Outlook Addin/AddinExpress.VSTO.DLL
Assembly Full Name: AddinExpress.VSTO, Version=2.7.2389.0, Culture=neutral, PublicKeyToken=2b3662baf831494c
Assembly Version: 2.7.2389.0
Assembly Build Date: 1/29/2007 12:34:32 PM

Exception Source:
Exception Type: AddinExpress.VSTO.ADXExternalException
Exception Message: Error occured in the code of the add-in.
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----

It's my understanding that the original edited item is destroyed in the process of committing and sending new emails. However, I don't understand how to safeguard against errors this might cause. Am I on the right track, and if so then what should I be doing?

EDIT:
Another developer came to me with a similar "Object reference not set to an instance of an object" error -- this time it was in the Explorer SelectionChange event, and the innermost error said "The Explorer has been closed and cannot be used for further operations. Review your code and restart Outlook."

Am I doing something wrong here???
Posted 12 Feb, 2007 14:06:06 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
UPDATE:
Okay, the way I see it, I'm dealing with navigation events where perhaps I'm making some incorrect assumptions. For example, if it's possible for there to be an Explorer SelectionChange event where there is no current folder, or an InspectorActivate event where there is no current item or commandbar, then those situations could cause these exceptions.

Are there any guidelines for this???
Posted 13 Feb, 2007 10:10:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Rick.

I would advise you to use the try ... catch statement to avoid such critical situations.




P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 13 Feb, 2007 22:26:46 Top