Clearing Legacy Word 2003 Macro Icons from Word 2010 Add-Ins Bar

During an Office 2003 Migration to 2010 , some custom Interwoven Macro’s got converted into a User’s Normal.dotm file from and Displayed in the Users Add-In. The buttons did nothing when you pressed them.

Per this doco :

I tried to list all the controls using the below VB Script however the unlinked buttons where not listed, so I couldn’treference them in VB to remove by using :


Sub ListAllControls()
Dim cmd As CommandBar
Dim ctr As CommandBarControl
Set cmd = Application.CommandBars("Menu Bar").Controls
On Error Resume Next
   For Each ctrl In ctr.Controls
     Debug.Print " " & ctrl.Caption & " "
     For Each sub_ctrl In cmd.Controls
         Debug.Print "  >> Caption: " & sub_ctrl.Caption & vbTab & vbTab; " OnAction: " & sub_ctrl.OnAction


I could remove them using the Gui in Word “Delete custom command” , however needed to roll this out across multiple users.

Instead I had to run the following command : ( Either as immediate ) ( Alt F11 then Ctrl G ) or in the macro code for main() which reset the whole toolbar


GD Star Rating
GD Star Rating

Tags: Customise Add-Ins Bar, Delete custom command, Normal.dotm, VB, Word 2003, Word 2010

Trackback from your site.