Menu Design with Macro

L

Lea Hayes

Hi

I have created a custom menu layout which is stored in a document called "menu.doc"; I need to create a macro within another document "newdoc.doc" which will toggle between the menus stored in "menu.doc" and the default menus. By menus I mean the items under File, Edit, etc..

Any help would be greatly appreciated

Best Regards
Lea Hayes
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < Lea Hayes > écrivait :
In this message, < Lea Hayes > wrote:

|| Hi,
||
|| I have created a custom menu layout which is stored in a document called
"menu.doc"; I need to
|| create a macro within another document "newdoc.doc" which will toggle
between the menus stored
|| in "menu.doc" and the default menus. By menus I mean the items under
File, Edit, etc...
||
|| Any help would be greatly appreciated!
||

A document (*.doc) does not store command bar and menu personalization. IF
you opened "menu.doc" and modified the menus, then in actual fact you have
modified "normal.dot", this means that doe modifications will be available
to all documents created from normal.dot, as "newdoc.doc" would presumably
be.

If you want only a certain set of documents to have the modified menu
available, create a template (e.g. "menu.dot") and create documents based on
that template, then only those documents will have the modified menu
available.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
C

Charles Kenyon

Since Word 97, at least, I've been able to create and store custom menus and
modifications to built-in menus in a document file. Nevertheless, the
obvious way to load/unload these modifications to use them in other
documents is to have them in an Add-In. Word will not load a document file
as an Add-In (nor should it).
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < Charles Kenyon > écrivait :
In this message, < Charles Kenyon > wrote:

|| Since Word 97, at least, I've been able to create and store custom menus
and
|| modifications to built-in menus in a document file. Nevertheless, the
|| obvious way to load/unload these modifications to use them in other
|| documents is to have them in an Add-In. Word will not load a document
file
|| as an Add-In (nor should it).

You are right Charles, I wrote too fast... My bad.

What I should have written is:

A document (*.doc) does not store command bar and menu personalization very
well. If you opened "menu.doc" and modified the menus (without changing the
"Save in" settings at the bottom of the "Customization" dialog), then in
actual fact you have modified "normal.dot", this means that doe
modifications will be available to all documents created from normal.dot, as
"newdoc.doc" would presumably be. Whenever I have tried to save
customization with *.doc instead of *.dot, I have been displeased with the
result. Very often the customization are lost if you travel from one
document to another during the same Word session, often I have to fake
changing the customization to get my stuff back. Very often when you open a
document that has customization stored in it, the customization do not
display. Furthermore, I have tried with VBA ("CustomizationContext =
ActiveDocument") without much success. So I am probably doing something
wrong, but I find the process of storing customizations in a *.doc very
buggy, I also never really had a need for it anyway, so I never really
investigated it further, I must confess (I always work from templates). This
is why I always use templates instead (*.dot ), never had any problems with
those.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
C

Charles Kenyon

I only do it to play around when I don't want to make changes to normal.dot.

I suppose it could be interesting to create a document with no menu bar or
modified menus for some special purpose. Since it would have no code, it
would get past macro security (harmlessly).

Also, I do 99.9% of my menu manipulations through the user interface rather
than using vba.
 

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