How to remove a CmdButton when exiting Outlook?

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
 
D

Dmitry Streblechenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top