If the button is created using the Temporary := True argument usually no deleting is actually necessary for Explorer buttons. That's usually only needed if an Inspector button is created for WordMail.
-- 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
"Thaddaeus Parker" <tparker[ at ]microlinkllc.com> wrote in message news:OJcu9ZNLGHA.1676[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text] > From the sounds of it you are attempting delete the button in the > UninitHandler AFTER the Explorer_Event_Close has already fired. The > explorer close event is where you want to get rid of all of your buttons, > etc. > Otherwise you will get the exception that you are seeing now, this is > because the COM-Addin has already "collected" the garbage leaving your > managed object dangling. When you attempt to delete using the function > Delete(), the object doesn't exist in memory any more and promptly throws > an exception. This in turn leaves some bad references in memory that > causes Outlook to remain in memory because it thinks that there is still > something out there that requires it to be resident in memory. > > Regards, > > Thaddaeus.
|