View Single Post
  #1  
Old February 2nd 06, 01:28 PM posted to microsoft.public.outlook.program_addins
Steve D
external usenet poster
 
Posts: 4
Default Outlook 2003 fires an Inspector Close when a send is cancelled

I have an Outlook COM AddIn that has been working fine with Outlook XP
and Outlook 2003.

However, I have recently updated my Outlook 2003 (to version
11.8002.6568 SP2) and now I am experiencing some problems.

Basically, the latest update appears to send an Inspector Close event
to the addin when a Send is Cancelled - this didn't happen with
previous versions.

Because I have code in the Inspector Close that tidies up and releases
the advise sinks on the Inspector/MailItem objects, when this scenario
occurs my code no longer runs for that Inspector.

The problem can be repro'ed using Outlook Spy using the following
steps

- create a new message
- select the Inspector button from the Outlook Spy toolbar
- click on the Events tab and ensure the 'Close' event is checked
- go back to the draft message and enter a non-resolvable recip (some
random text will do)
- send the message, Outlook will display the "Check Names" dialog
to say that the recipient could not be found
- when you cancel this dialog, you will then see the 'Close' event
fire in the "Inspector" window
- none of the Outlook Spy toolbar buttons now function

Does anyone know a way around this problem?

Should I be doing the tidying/releasing during some other event? I
think I tried to do it in the MailItem Close event but had similar
problems when sends/saves were cancelled

Thanks
Steve

Ads