Toolbar changes do not stay

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I repeatedly turn on the Web toolbar, but then on subsequent occasions when I
start Word, the toolbar has disappeared.

How can I prevent it from going away?
 
This belongs to a section of VBA code that will run every time you start
Word. Hit Alt-F11 to edit your VBA code. In the main code module of the
Normal template, the following needs to be added:

Sub AutoExec()
CommandBars("Web").Visible = True
End Sub

Or simply add the middle line if such a Sub already exists.

Hope this isn't too high-level.
Andrew
 
I get the rough idea. However, I'm not familiar enough with the VBA editing
environment to know exactly how to do this, particularly I don't know what
you mean by "the main code module of the Normal template". When hit Alt-F11,
I see:

Project Normal
- Normal
- - Microsoft Work Objects
- - - ThisDocument
- Project (Document6)
- - Microsoft Work Objects
- - - ThisDocument
- + References

Here's what I tried: I added the three lines you suggested to the Normal /
Microsoft Work Objects / ThisDocument module. (It was empty when I started.)
I close and reopen Word and the code I added is still there, but hasn't run.
I'm sure my mistake is simple and obvious; I just am not familiar enough
with the VBA environment, and the structure of the VBA code for templates.

(Also, apart from the VBA code, I thought that changes to the toolbars or at
least to the toolbars viewed would be persistent on subsequent occasions when
I open Word. Am I just wrong about that, or is there a special difficulty in
this case?)

Thanks for your help!
 
You said you see:

Project Normal
- Normal
- - Microsoft Work Objects
....

If Normal doesn't have a child called "Modules" then right-click "Normal"
and Insert->Module. In this new module, stick the AutoExec subprocedure
mentioned earlier. Shouldn't matter what the module is called. Then (just
in case) hit Save so that Normal.dot (Word template) is saved.

You are not wrong to expect Word to save toolbar changes when you exit Word.
These changes are saved in the Normal template. If it's not doing so,
perhaps some installed add-in is setting Normal's "Saved" property to true,
which means Word assumes Normal doesn't need saving.

If your toolbar changes never seem to save, then you can save the Normal
template yourself. Hold Shift and go to the File menu. A "Save All" item
appears that you can use to save all docs, including the Normal template. Or
to save only the Normal template, hit Alt-F11 (the VBE), make sure Normal is
active (click on Normal in the list) and hit the Save button there.

Andrew
 
While your assumption, that toolbars stay put when you turn them on,
is true of most toolbars there are a couple that don't always follow
this rule. What you are currently encountering is a case of Microsoft
trying to make the majority happy. In previous versions the Web
toolbar would surface unexpectedly and it drove users nuts. So they
(MS) changed the behavior. As a matter of fact, I wrote a FAQ on how
to banish the Web toolbar. ;-)

Here are the steps you need to create your macro:

1) Copy the lines of code between Sub AutoExec () and End Sub at
the end of this post
2) In Microsoft Word click the Tools menu
3) Point to the Macros command
4) Click Macro
5) Type AutoExec in the Macro Name text box

6) Click the Create command

7) Place the previously copied code between the Sub and End Sub

8) Close the Visual Basic Editor and return to Word

9) If prompted to save changes to Normal.dot upon exiting Word
select Yes

Macro:

Sub AutoExec()
CommandBars("Web").Visible = True
End Sub

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
Andrew -

One step forward....

I think I've done what you suggested, but can't yet get it to work. Now I
see:
Project Normal
- Normal
- - Microsoft Work Objects
- - - ThisDocument
- - Modules
- - - Module1
....

I've entered the code in Module1, saved, exited Word and restarted. Didn't
seem to work. Then I added a deliberate syntax error to see if the Sub was
being called, so Module1 now reads:

Sub AutoExec()
CommandBars("Web").Visible = True
mistake
End Sub

But it's not called when I start Word, because it doesn't trigger the error.
I can go into Tools / Macros / Run and run Autoexec and run AutoExec
manually and it does invoke the routine because I do get an error message on
my error. (But even so, the previous line has not had the desired effect,
because the Web toolbar is still not visible.)

Thanks again for your guidance and your patience.
 
Offhand, I can think of two possible reasons it's not running:
1. You're starting Word from another program, e.g. Outlook or IE. The
autostart macros are generally disabled when Word starts this way.
2. You are starting Word with the /m parameter. Check the shortcut you're
using to see if it's there.

Beyond that:
1. Blame Adobe because that seems to be the next (or first!) course of
action for most people. Do you have any Adobe add-ins installed? Try
removing them.
2. Hope one of the MVPs will chime in... I'm too new at this :).

Andrew
 
You're doing fine, Andrew :)

Eric,

There are two problems: the disappearing toolbar and the non-running macro.

For the missing toolbar see if there is anything here which helps:
http://word.mvps.org/FAQs/AppErrors/MissingMenusEtc.htm

For the macro, the fact that it *is* being saved means that Normal.dot is
being saved. This doesn't completely exonerate Adobe but it is not the usual
Acrobat version 7 problem. Are you running Word as editor in Outlook?
 
Are you running Word as editor in Outlook?
Yes.

I thought I'd done all the standard things to avoid interference between
Word and Outlook, particularly by rebooting and restarting Outlook, and
making sure Word is not open as an editor for Outlook.

But I've just discovered that if I quit Outlook and then restart Word
normally, outside of Outlook, the AutoExec *does* work! So that part of the
problem is solved.

Thanks Tony, and thanks Andrew!
 

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

Back
Top