Have been pulling my hair out trying to make commandbar buttons go in VB Addins for Office 2000. There are a couple of gotchas here
-
Any references to buttons that you’ve added are not valid by the time you get to the disconnection method. There’s a MSDN KB article on this and the workaround is to use FindControl to get a new reference to the button.
-
The above technique works for Powerpoint and Excel. With ms word, the button is more stubborn. Turns out that it updates the normal template. So in a word addin, in addition to calling delete on the button, you should also save the normal template - see below..
btn.Delete
m_Application.NormalTemplate.Save