|
|
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
|
|
Just as an aside to this - I have also tried trapping the Deactivate event and then looping through the Inspectors collection to see if "this" inspector is still present in the collection, and if its not then I run the tidy code. Unfortunately, there was some bizarre behaviour (that I can't quite remember) which made it unworkable
Steve
|
|
This has been reproduced and reported to MS as a bug from that hotfix.
We're trying to find out if a later hotfix might have fixed this, or if not, when it's scheduled to be fixed.
In the meantime, you can remove that hotfix from Add/Remove Programs in the Control Panel. It's 892843. It also causes other problems it seems, with accepting task requests and with using the Folder argument in CreateItemFromTemplate.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Steve D" <seattlestokie[ at ]hotmail.com> wrote in message news:1138886937.546165.240580[ at ]g14g2000cwa.googlegroups.com...
[Quoted Text] >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 >
|
|
Further testing reveals this problem only occurs if using the Outlook email editor, not with WordMail.
MS is working on a hotfix for this bug.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message news:eI5PwZDKGHA.2992[ at ]tk2msftngp13.phx.gbl...
[Quoted Text] > This has been reproduced and reported to MS as a bug from that hotfix. > > We're trying to find out if a later hotfix might have fixed this, or if > not, when it's scheduled to be fixed. > > In the meantime, you can remove that hotfix from Add/Remove Programs in > the Control Panel. It's 892843. It also causes other problems it seems, > with accepting task requests and with using the Folder argument in > CreateItemFromTemplate. > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm
|
|
Thanks for the info Ken
Steve
|
|
I'm also looking for a workaround, since this will impact some code projects of my own and you can never depend on users to have the latest update, even if it's eventually released on Office Update. I'll post back here when I hear about the QFE or I find a usable workaround.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Steve D" <seattlestokie[ at ]hotmail.com> wrote in message news:1139316058.582553.222050[ at ]g14g2000cwa.googlegroups.com...
[Quoted Text] > Thanks for the info Ken > > Steve >
|
|
I did a workaround whereby in the Inspector Close event, I checked whether the Inspector was still in the Inspectors collection and it it wasn't then I'd do the tidying up.
This appeared to work ok for all versions of Outlook I tried it on (XP, 2003 with and without this 'patch'), but I've not tested it extensively.
Steve
|
|
That might vary depending on if Outlook 2000 was being used and also if an Inspector wrapper class and collection are being used, which I use a lot. And I have to support Outlook 2000. I was thinking of that or possibly a flag set in Item.Send when canceling. That could be checked in Inspector.Close as well as other procedures like timer events.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Steve D" <seattlestokie[ at ]hotmail.com> wrote in message news:1139333618.769412.143560[ at ]z14g2000cwz.googlegroups.com...
[Quoted Text] >I did a workaround whereby in the Inspector Close event, I checked > whether the Inspector was still in the Inspectors collection and it it > wasn't then I'd do the tidying up. > > This appeared to work ok for all versions of Outlook I tried it on (XP, > 2003 with and without this 'patch'), but I've not tested it > extensively. > > Steve >
|
|
The fix I coded used a flag and a timer. I needed to do some work in Inspector.Close but only after a few other things were done. So in Item.Send I set a Boolean flag and at the top of Inspector.Close I test for that flag. If True I just exit that event handler. A timer fires 500 ms after leaving Item.Close and makes some procedure calls to do some things and then clears the flag and explicitly closes the Inspector. Since the flag is clear the cleanup code in Inspector.Close did it's work. This seems to have worked around the bug.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message news:%23LUux4DLGHA.3276[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text] > That might vary depending on if Outlook 2000 was being used and also if an > Inspector wrapper class and collection are being used, which I use a lot. > And I have to support Outlook 2000. I was thinking of that or possibly a > flag set in Item.Send when canceling. That could be checked in > Inspector.Close as well as other procedures like timer events.
|
|
|