How to remove a CmdButton when exiting Outlook?

  • Thread starter Thread starter Falconetti Daniel
  • Start date Start date
F

Falconetti Daniel

Hello,

I added in objOutlook_startup oCmdButton
I'd like to remove it when Outlook close but can't find in wich event to do
it!

I tried in Explorer_close while checking that I'm in the last explorer but
the object doesn't exist and I can't get it!

I've seen lot of examples removing cmdButtons on folder_switch events or
view-change but can't figure out how to do it when Outlook Close.

Tks for your help
 
Create the button as temporary, this way Outlook will not persist it -
CommandBar.Controls.Add(..., Temporary:=true).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top