From the Menu (in Word) select Tools > Macro > Macros... (or just press the
Alt+F8 shortcut)
In the Window which opens up (the "VBE") you should see a window on the
right headed "Project - Something or Other".
This is a tree view of the Documents and Templates you have open. In this
list find the document in which you've saved your toolbar - the document
name is the one in parentheses probably following "Project" - or if you are
trying to protect a built-in toolbar, find the entry named "Normal". Select
the entry you have found.
On the Menu (in the VBE) click on Insert > Module. A blank window will open
up.
Again from the Menu, select Insert > Procedure. A dialog will open up -
enter a Name (say "ProtectToolBar") and Press OK
Some code will be added to the window. like this ...
Public Sub ProtectToolbar()
End Sub
Place your cursor on the blank line between the two lines of code and type
CustomizationContext = MacroContainer
(this isn't necessary (but is harmless) if you are doing this in Normal.dot)
Press Return and on the next line type ...
CommandBars("NameOfTheCommandBarYouWantToLock").
(with the appropriate name, of course)
After you type the dot at the end adropdown will appear. Either type or
select from the list, Protection
Type (space) = (space)
Another dropdown will open up with a list of names beginning mso...
Select (or type) one of these, say msoBarNoCustomize - as Greg suggests
Press F5 to run the code.
This will stop anyone adding (or removing) buttons.They will still be able
to move the toolbar. If you also want to stop that you will need to add some
extra protection.
Go back and place ypur cursor at the end of the line (after
msoBarNoCustomize) and type (space) + (space) and the list of mso...
constants will again appear.
This time select msoBarNoMove, so your code looks like this ...
Public Sub ProtectToolbar()
CustomizationContext = MacroContainer
CommandBars("Standard").Protection = msoBarNoCustomize + msoBarNoMove
End Sub
Press F5 again to run this new code.
Now you will not be able to add or remove icons, nor will you be able to
move the toolbar (the grab handle will vanish)
As many as you want of the different types of protection can be added up in
this way - the names are fairly self-explanatory but Help or, better, simple
experimentation, will show what each does.
When you have finished you can close the VBE by pressing the X in the top
right or pressing Alt+F4 just like any other normal window.