A way to know what shortcut was clicked?

C

Christopher Deel

Is there a way in VBA to perform an action *based on what template or
shortcut-to-a-template* was clicked to generate a new file from a template?

Basically I have a document that comes in several different "flavors" and
mostly all that changes is the title, so I wanted to have one "real"
template in our Workgroup Templates folder and several different shortcuts
that point to that template (with descriptive names: Bulletin, Addendum,
etc.)

So can I make an AutoNew macro that "knows" which shortcut was clicked?
 
Z

zkid

Hmm. There are many ways to tackle this one. I'm not quite certain that I
completely understand what you're trying to accomplish here, but...

I just answered this question in another thread. If you maintain separate
templates, then you can determine the original template by:

myTemplate = ActiveDocument.AttachedTemplate

I'm not quite sure what you mean by "shortcuts." You could just provide a
macro menu for people to choose what "template" they need and then run the
autonew code based on the response.
 

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