Old Add-In Uninstall Leaving Commandbars

B

Bobby Cochran

I have been working on an add-in using VSTO with VS.NET 2005. In an older
version we had a bug that didn't remove the command bars from outlook when it
was finished with them. After uninstalling, reinstalling a few times, we
have old commandbars hanging around that are interfering somehow with the new
add-in's functions. How can we manually go in and delete old instances of
our old add-in and/or the commandbar.

Any help will be appreciated!
 
K

Ken Slovak - [MVP - Outlook]

CommandBars in Outlook as well as any other modifications or customizations
of the menus/toolbars are kept in a file named Outcmd.dat. Delete or rename
that file while Outlook is closed, it will be re-built when Outlook is
opened again.

For your old addin just uninstall it. You do provide an ability to
uninstall?

Always create any custom buttons/toolbars using the Temporary = True
setting. Unless Outlook crashes they will automatically be removed when
Outlook closes. As a belt and suspenders helper also find the buttons in
your shutdown code and delete them if they still exist.

WordMail buttons are different, Word doesn't respect the Temporary setting.
In that case you must find and delete the buttons as the Inspector closes.
Reinstantiate them so you get valid objects and then delete them. You also
will need to check and set the CustomizationContext of the buttons as they
are created and destroyed so the user won't get prompts to save changes.
 

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