Mark J. McGinty said:
Thanks for the reply, Ken.
A couple more questions, if I may... The temporary flag prevents the
bar/button definition from being persisted? Wouldn't that tend to make
removal unnecessary?
I take it you don't pay any attention to RemoveMode when the AddIn
disconnects?
Hmm, trying to remove them when (RemoveMode <> ext_dm_UserClosed) seems to
be a moot point, since that is the only way OnDisconnection fires while a
valid Explorer exists. I also noticed that removing CommandBars in
Explorer_Close fails with error: "The Explorer has been closed and cannot
be used for further operations. Review your code and restart Outlook."
I made both the buttons and the bars temporary (and manually deleted the old
bar.) The buttons go away when OL exits, but the bar persists, even when
the temp parameter to CommamdBars.Add is True.
Where do you remove your CommandBars?
-Mark