Re: Macro shortcut keys in Word 2007 template don't work
- From: almeck <almeck@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Jun 2009 10:13:02 -0700
Well Tony, I just composed a lengthy reply (thanking you for your comments
below), posted it, and got a "post didn't happen" message.
So, here's a quick summary:
1) You are right, the shortcuts in the template SHOULD be instantly
available upon merely loading the template. In fact, I believe that was the
case a couple of days ago, but then it stopped working yesterday.
2) My PC (XP) has been on and intensively used for the last week. 20
minutes ago, I opened Word and the Office Button wouldn't work! I performed
an overdue reboot, and now the shortcuts work as you describe below.
3) However, with the newly re-booted and working Word, I have noticed that
NO shortcut keys are shown as assigned in Customize > Keyboard shortcuts.
Not only don't I see the ctrl-W shortcut (from the template) as assigned to a
macro, the many shortcut keys I had assigned in Word 2003 a) STILL WORK, but
b) are not shown assigned to anything. Of course, I forget exactly how I
migrated my Word 2003 Normal.dot to Word 2007's Normal.dotm, but I'm guessing
however I did it might be the cause of the working-but-not-shown-as-assigned
shortcuts. But what about my template's ctrl-W shortcut: shouldn't I be
seeing it as assigned (to the template macro that it successfully invokes)?
I realize this is another problem that you may not wish to respond to, but,
in any case, your insistence that things should work as you describe below
helped me push foward to the reboot/fix. Thanks!
Al
"Tony Jollans" wrote:
In a word: "No"! You seem to be jumping to a lot of conclusions that are,.
almost, wholly false.
When you have a template in Word's Startup folder, it will be loaded as a
global template. This means that all the macros in it are available to use,
(but not to edit). You don't have to do anything else to make things work.
If you have a shortcut key assigned, in the template, to a macro in the
template, it should work; if it doesn't, you have something set up wrongly.
My first guess would be that you have the key assignment stored in Normal,
rather than in your global template.
--
Enjoy,
Tony
www.WordArticles.com
"almeck" <almeck@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C091FB5-2B96-4784-945A-26FD6435E642@xxxxxxxxxxxxxxxx
OK, so here's what I've learned:
Putting a template in Word's Startup folder will "load" it as a "Global"
template upon Word opening. BUT, you have to take steps to use anything
in
it (so far, it's just "available"). There is only(?) one wat to "get" to
stuff that's in a template: You must "attach" the template (via Developer
>
Document Template > "Attach" and browse to Word's Startup folder to find
it
to attach). After attaching, any keyboard shortcuts that been assigned in
the template will become active.
If you want to obviate the need to re-attach the template everytime you
open
Word, (after attaching the template and making the template's macros
accessible) you could create keyboard shortcuts that match those in the
template. These shortcuts will be stored in Normal.dotm (which will be
checked first when a shortcut key is pressed). Thereafter, upon opening
Word, the keyboard shortcuts you duplicated (now in Normal.dotm) will fire
off the macros in the loaded template (even though you haven't manually
attached it).
"Stefan Blom" wrote:
If you see "[unassigned]" in the dialog box, the Ctrl+W shortcut hasn't
been
properly assigned to the macro.
Also, note that if you are attaching the template to a certain document,
you
don't need to load the template as an add-in.
In fact, attaching and loading are used for different purposes: When you
load a template as an add-in, your goal is to get global access to its
macros, building blocks, and keyboard shortcuts. When you attach a
template,
you want access to those items for a particular document (or a particular
set of documents).
In addition, attaching gives you access to style definitions, assuming
that
you choose "Update document styles" in the Templates and Add-Ins dialog
box.
--
Stefan Blom
Microsoft Word MVP
"almeck" <almeck@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:49DC6BDD-9CC6-48E2-BECD-331BA17ACD69@xxxxxxxxxxxxxxxx
Thanks for replying, Stefan.
I believe there are no other macros assigned to the key I specified
(ctrl-W)
in the loaded-at-startup template. As a test, I chose a macro at
random
(in
a blank doc) and tried to assign ctrl-W to it. I get "currently
assigned
to
[unassigned]", which I take as proff that ctrl-hasn't been assigned to
anything.
My goal is to wake upin a new Word doc, type ctrl-W, and have that
macro
run. After further investigation, I see that my .dot file is *loaded*,
but
not *attached*. Once I attach it (via Developer Template), *then*
ctrl-W
works as hoped.
So, I guess now my question is:
1) Given that I've got the .dot file *loaded* upon Word opening,
2) how do/can I cause that template to be *attached* automatically upon
Word
opening?
"Stefan Blom" wrote:
This sounds like a conflict of key assignments. The keyboard shortcut
for
your macro could be assigned to something else in the current document
(or
its attached template), in which case the latter will take precedence.
If
you look in the Customize Keyboard dialog box, does that give a clue
to
what
is happening?
--
Stefan Blom
Microsoft Word MVP
"almeck" <almeck@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8601D387-97DF-48E7-97B7-0E8E27DF03DA@xxxxxxxxxxxxxxxx
I have placed a .dot file template in Word's (2007) Startup folder so
that
the macros it contains will be available whenever I run Word. My
intent
was
also that the shortcut keys that have been assigned to the macros
(in
the
.dot file that's being loaded at Startup) would also work: they
don't.
The
file, though, is loaded as expected (as can be seen via Developer >
Document
Template).
However, if I remove the template file from Word's Start up folder,
restart
Word, and *manually* load the .dot template (from its "home" in
Trusted
Templates), the shortcut keys *do* work.
Thoughts?
- Follow-Ups:
- Re: Macro shortcut keys in Word 2007 template don't work
- From: Tony Jollans
- Re: Macro shortcut keys in Word 2007 template don't work
- From: Peter T. Daniels
- Re: Macro shortcut keys in Word 2007 template don't work
- References:
- Macro shortcut keys in Word 2007 template don’t work
- From: almeck
- Re: Macro shortcut keys in Word 2007 template don't work
- From: Stefan Blom
- Re: Macro shortcut keys in Word 2007 template don't work
- From: almeck
- Re: Macro shortcut keys in Word 2007 template don't work
- From: Stefan Blom
- Re: Macro shortcut keys in Word 2007 template don't work
- From: almeck
- Re: Macro shortcut keys in Word 2007 template don't work
- From: Tony Jollans
- Macro shortcut keys in Word 2007 template don’t work
- Prev by Date: Re: Index field spacing issues between name and page numbers
- Next by Date: My hyperlinks only work for me
- Previous by thread: Re: Macro shortcut keys in Word 2007 template don't work
- Next by thread: Re: Macro shortcut keys in Word 2007 template don't work
- Index(es):
Loading