Fixing toolbars in place

R

rogrob1

I find that toolbars move to different locations on by desktop when I open
other programs and return to a Word file. I need a way to fix toolbars in
place, or a macro that will move them to preset locations when I need them to
go where they belong.
Thanks
(e-mail address removed)
 
G

Gordon Bentley-Mix

Hard to do Roger. Controlling toolbars (called CommandBars in VBA) is like
herding cats: they pretty much go where they want to go and completely
without warning. And just to make things more exciting, there are over 140
CommandBars in the Word 2003 OM - and that doesn't even take into account the
custom toolbars that any add-ins might load up. Trying to come up with a
method that would set and lock the position of them all would be a HUGE task.
And as you've already seen, Word is pretty lax about retaining manually set
toolbar positions on its own.

If you do decide you want to have a go - and I'd recommend that you try it
yourself first rather than expecting someone in the forum to come up with a
total solution for you - you'll probably want to look at the Visible,
Position, RowIndex and (possibly) Enabled properties of the CommandBar
object. You'll need to work out what the "correct" values are each of these
properties for every toolbar concerned, and then write code to reset these
properties to the appropriate values. If you run into problems, post back.
--
Cheers!
Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
J

Jonathan West

rogrob1 said:
I find that toolbars move to different locations on by desktop when I open
other programs and return to a Word file. I need a way to fix toolbars in
place, or a macro that will move them to preset locations when I need them
to
go where they belong.
Thanks
(e-mail address removed)

Pretty much impossible, because any add-in can choose to move any toolbar
using VBA. You have no way on knowing what will get moved where and whether
som other program has moved a toolbar after you put it where you want it.
 

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