How to make toolbars stay where located when word is used in out?

K

Klaus Linke

Hi Bud,

I'm not sure I understand your meaning ("in out"). Usually the toolbars
should stay put unless you move them.

You can lock them down (so you can not move them any more yourself from the
user interface) with VBA.

Say for the Standard toolbar:
-- Go into the VBA editor (Alt+F11)
-- Go to the immediate window (Ctrl+G)
-- Check if there is already some protection:
? CommandBars("Standard").Protection

Probably, you'll get the result 0 (= msoBarNoProtection)

Now you can lock the toolbar down:
CommandBars("Standard").Protection=msoBarNoMove+msoBarNoResize

There are different kinds of protection... You can play around with them,
and check the effect in the document window.

As soon as you type the "=" (or the "+") in the code line above, you should
get a dropdown from which you can choose the msoBar constants.
If not, go into "Tools > Options, Editor tab", and check "Auto List Members"
(and everything else while you're at it).

If you want to undo your changes, set
CommandBars("Standard").Protection=0
(or whatever you had in the beginning)

Regards,
Klaus
 

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