Keeping key bindings active

C

Chris Jakeman

Hi,

I want to load a document (or template) containing some macros and
key-bindings to provide special editing functions (SEF) I can use on
other documents.

I could put this VBA inside normal.dot, but I keep that for standard
editing enhancements and I want a separate document to hold these
special editing functions. Let's call the document SEF.

When I open SEF and assign a key binding to a macro in SEF, that works
fine as long as SEF is the active document. If I open any other
document (based on another template), the key bindings are not active
until I return to SEF.

Qu.1: How can I keep the key bindings active, which ever document I am
working on?
Qu.2: Is there a better way to approach this?

I'm grateful for any advice.

Chris
 
C

Cindy M -WordMVP-

Hi Chris,

Save SEF as a template, in the STARTUP folder. When you start Word it
will be loaded automatically and all the keybindings and macros should
be available globally (unless a locally saved shortcut overrides).
I want to load a document (or template) containing some macros and
key-bindings to provide special editing functions (SEF) I can use on
other documents.

I could put this VBA inside normal.dot, but I keep that for standard
editing enhancements and I want a separate document to hold these
special editing functions. Let's call the document SEF.

When I open SEF and assign a key binding to a macro in SEF, that works
fine as long as SEF is the active document. If I open any other
document (based on another template), the key bindings are not active
until I return to SEF.

Qu.1: How can I keep the key bindings active, which ever document I am
working on?
Qu.2: Is there a better way to approach this?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
C

Chris Jakeman

Cindy said:
Save SEF as a template, in the STARTUP folder. When you start Word it
will be loaded automatically and all the keybindings and macros should
be available globally (unless a locally saved shortcut overrides).

That works fine. Many thanks.

Now that I have a solution in the bag, perhaps I can pursue this a
little further?

My ideal would be to have SEF, a document containing instructions and
some supporting VBA code, which my colleagues could open. As long as
SEF was open, some toolbars/menus/key bindings would be available even
if other documents were opened (so the VBA could work on those other
documents). The toolbars/menus/key bindings would disappear once SEF
was closed.

Is this arrangement possible? Is it just the key bindings bit that is
an issue?

Bye for now,

Chris
 
C

Cindy M -WordMVP-

Hi Chris,
My ideal would be to have SEF, a document containing instructions and
some supporting VBA code, which my colleagues could open. As long as
SEF was open, some toolbars/menus/key bindings would be available even
if other documents were opened (so the VBA could work on those other
documents). The toolbars/menus/key bindings would disappear once SEF
was closed.

Is this arrangement possible? Is it just the key bindings bit that is
an issue?
In this case, I'd go to two separate templates. SEF would, in this case,
be copied to a folder other than STARTUP.

The new template should go into the Startup folder. It provides a single
tool for loading/unloading SEF.

To see what I have in mind, go to Tools/Templates and Addins. Look at
the list of loaded Add-ins. If SEF is in STARTUP, it automatically
appears in this list. It can be removed by unchecking the entry. What
you want is the macro code that emulates this: to Load+Install / Unload
SEF. You should be able to get the basic syntax by recording a macro
using the Browse button to load SEF (OK the dialog box, stop the macro).

The tricky part will be knowing in which file location the users have
copied SEF. Simplest would be if all of you could agree on one folder
:) Possible would be to present a dialog box the first time that lets
the user browse, then save this in the "master template", an INI-type
file, or in the Registry so that your code can look it up.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
C

Chris Jakeman

Cindy said:
In this case, I'd go to two separate templates. SEF would, in this case,
be copied to a folder other than STARTUP.

The new template should go into the Startup folder. It provides a single
tool for loading/unloading SEF.

Thanks. I'll give this a try and post again when I've explored this
approach.

Bye for now,

Chris
 

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