Word CommandBars (toolbars) disappear.

N

norbert

In my application I am using the Word OLE (Word.Application) creating a NEW
instance of word. When I display the document I disable all CommandBars in
that document. This works fine on my machine using 2003 but a colleague of
mine was testing the solution on his machine with word 2000 and all his
toolbars under his regular word application disapperad when he launched word.
This is a major flaw. Is there any solution to this, that I can only alter
MY instance not the whole application.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?bm9yYmVydA==?=,
In my application I am using the Word OLE (Word.Application) creating a NEW
instance of word. When I display the document I disable all CommandBars in
that document. This works fine on my machine using 2003 but a colleague of
mine was testing the solution on his machine with word 2000 and all his
toolbars under his regular word application disapperad when he launched word.
This is a major flaw. Is there any solution to this, that I can only alter
MY instance not the whole application.
It's a question of where the changes you're making are stored. In a general way,
if you want to change how things look for ALL documents, then the changes must
be made in the Normal.dot template (NormalTemplate). And this will affect other
instances of Word.

In order to make your application "polite" you really need to store all the
changes you make, then reinstate them when your application closes.

There really isn't a way to affect only your instance; that simply isn't how
Word was designed to work.

If your application is document- (or document type) specific, then you can store
the settings you want in a specific template. That should override the
application-wide settings coming from Normal.dot. The trick to achieving this is
to set CustomizationContext to ActiveDocument (for example, where the active
document can also be a template file) so that your changes are not stored in
Normal.dot. Create your instance, generate a new file from your template, and
the toolbar settings in the template should take precedence. Your code can then
go on to loop through any other toolbars the user or other apps may have created
and disable them for the CustomizationContext AttachedTemplate.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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