Template and Keyboard Commands

D

David D

I have created a letterhead template for my client. I've created a few
macros (stored in Module1) that have been assigned to key shortcuts (like
Alt-Shift-P which brings up the File Properties box and then updates all
document fields). All of these feautres work just fine when I'm editing the
DOT file itself.

So there's two issues which I'm hoping there's a simple solution for:

1) If I open the DOT file as a new DOC, none of the keyboard shortcuts work.

2) If I go to Tools | Macros | Macros, none of the macros are listed. This
is probably the cause for #1.

Ultimately, these features need to work from a network share at my client's
location, and cannot be "broken" if the file is emailed around between people
at home and back to the office.

Does anyone have any ideas or links? Much appreciated.
 
P

Pat Garard

G'Day David,

I can not reproduce this.

If the Template is in one of the Template (Tools>Options File) Locations
and you choose File>New from within Word, the new document will
include a reference to that Template (and therefore it's Macros).

The same applies if you right-click the Template in WinExplorer and
click 'New'.

You can check this from the VBA Window - ALT+F11, then look
at the 'Tree' in the top left corner:
+ Some AddIn Template(s) - if any ..Any Word Addins
+ Normal ..Normal Template
+ Project (Document1) ..Original Empty Doc
+ Project (Document2) ..New (YourTemplate) Doc
+ TemplateProject (YourTemplateName) ..Your Template

Is this what you can see?

Clicking the '+' next to the bottom entry should show the Module in
your Template. Does it?
 
D

David D

Pat,

Thanks for your response. Even after placing the .DOT file in my Templates
folders so that it appears with all of the other default templates, the macro
is still "disassociated".

When I launch a new file off the Letterhead.DOT template, the macro is not
listed under Tools | Macros | Macros.

What is odd, is if I hit Alt-F11, the Module1 is there with the code
underneath Project (DocumentX). And, if I look at the + under References, it
says there's a reference to Normal.dot and not my Letterhead.dot.

If I look at Tools | Templates, I see that the file is indeed linked to
normal, and not my letterhead.dot. This is despite having created the file
*right* from the letterhead template.

And if I use the Attach command to try to attach my letterhead.dot, I get
the error "the document template is not valid".

So, does that help any?
 
W

Wendell A. Clark

It may be too obvious but -- did you assure the macro is stroed in the right
file set -- I have lost a few when I've gotten interuppted -- Just a thought
;-)


--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.
 
P

Pat Garard

G'Day (again) David,
the error "the document template is not valid".
I think this says it all!
Re-name the Template. Open the (renamed) Template. Re-create the
Template (using copy/paste to minimise work).

Does that fix it?
 
P

Pat Garard

David,

When you created the template, did you Save As..... and select
type: "Word Template (.dot)" - this works
OR
Did you create a DOC and rename it to .DOT - this don't work!
 

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