removing caommandbar outlook

L

Lars Roland

Hi -

Is it possible to write a vba scirpt that will remove an commandbar (and
its entry in the list of toolbars), from outside outlook. I need this
script because my commandbars are not always removed when a user uninstall
it and setting the comanndbar to Tempoary:=True dows not seam to help. So
the idea was for the uninstaller to call a script to ensure that the
commandbar will be removed.

Can this be done ?


Thanks
 
K

Ken Slovak - [MVP - Outlook]

Yes, but a better way is to make sure you are handling all cases correctly
where Outlook is being closed or the user disconnects the addin. In addition
to setting Temporary := True I usually add commandbars I add to Inspectors
and/or Explorers into a CommandBarsTags collection. Then in my code that
releases all objects when Outlook is closed or disconnected I iterate that
collection and get the Tag for each member of the collection. I then see if
an object with that Tag is around and delete it if it is.
 

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

Similar Threads


Top