Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

A way to know what shortcut was clicked?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christopher Deel - 15 Apr 2006 00:48 GMT
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?
zkid - 15 Apr 2006 01:34 GMT
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.

> 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?
[quoted text clipped - 6 lines]
>
> So can I make an AutoNew macro that "knows" which shortcut was clicked?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.