I suppose you could always write an AutoOpen macro that would cycle through
all of the CommandBar objects in the CommandBars collection and set their
..Visible property to False. Something like the following might work:
Sub AutoOpen()
Dim myCB As CommandBar
' Look at each CommandBar
For Each myCB In ActiveDocument.CommandBars
' Check to see if it's enabled ('cause it doesn't matter if it's not)
If myCB.Enabled = True Then
' Check to see if it's visible (again 'cause it doesn't matter if it's not)
If myCB.Visible = True Then
' Make sure it's not the Menu Bar ('cause that one should still show)
If myCB.Name <> "Menu Bar" Then
' And then hide it
myCB.Visible = False
End If
End If
End If
Next myCB
End Sub
However, because the CommandBars collection is also a child of the
Application object, I'm pretty sure this is going to be a sort of
"psuedo-global" change and not just specific to the one particular document -
at least this is how it appeared to me when I was testing it. Under certain
conditions, after running this code the toolbars are hidden from then on.
In addition, I have PDF Maker installed on this machine, and the PDF Maker
toolbar loads if Word is not running prior to opening the document - most
likely because of the order of execution: the AutoOpen macro runs then the
PDF Maker add-in loads and runs its own code to show its toolbar.
And of course, there's nothing to stop the users from just turning the
toolbars back on again...
This doesn't seem like an especially useful exercise to me. Perhaps if you
told us what the intent is behind your request, we could provide recommend a
better solution?
--
Cheers!
Gordon
Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.