removing caommandbar outlook

  • Thread starter Thread starter Lars Roland
  • Start date Start date
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
 
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.
 
Back
Top