Trying to banish toolbars - not working!

E

Ed

In accordance with several posts here, I'm trying to banish the Web and
Reviewing toolbars with an AutoExec macro in the Document object of
Normal.dot in Word XP. This is NOT working, though. The Web toolbar has
especially been annoying today. Can anyone help with this?

Ed

Sub AutoExec()

With Application.CommandBars("Reviewing")
.Enabled = False
.Visible = False
End With
With Application.CommandBars("Web")
.Enabled = False
.Visible = False
End With

End Sub
 
H

Helmut Weber

Hi Ed,

all of a doc, maybe even all of the application
seems to be available only after automacros
have been executed completely.

Sub AutoExec()
' other code if there is some
Application.OnTime _
When:=Now + TimeValue("00:00:02"), _
Name:="RemoveBar"
End Sub

Sub RemoveBar()
With Application.CommandBars("Reviewing")
.Enabled = False
.Visible = False
End With
With Application.CommandBars("Web")
.Enabled = False
.Visible = False
End With
End Sub


You have to check out,
whether TimeValue("00:00:02") is sufficient.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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