Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Shortcuts to Templates

Status
Not open for further replies.

LWComputingMVP

IS-IT--Management
Jul 3, 2005
870
US
A Client of mine is looking to get what I assume would be macros setup so that he can pull up his Fax template (new fax) by pressing ALT+F (or CTRL+F) and a new letterhead document by pressing something similar with L or H (CTRL+L or CTRL+H -- or use the ALT key).

I don't have the slightest idea about where I begin with this... I don't know how to write the Macro and I don't know where to put the Macro so it's "active
 
The simplest thing for you to do at this point is to turn on your macro recorder (Tools-Macros-Record Macro). At that point you can assign a shortcut key as well as actually get the code. After you finish recording the macro, you can look at it (Alt-F11) but it will probably work fine as is.

_________________
Bob Rashkin
 
You can assign a shortcut key after the fact by Tools > Customize, select Macros from the Categories, then select Keyboard.

Be careful. Word defaults to normal.dot when dealing with macros. So check the Save in dropdown to make sure things are going into the right file.

As for the macro itself, Bong is right in suggesting using the macro recorder to start. However, recording often adds quite a bit of extraneous crap. The advantage with recording is that you can assign the keyboard shortcut at the same time. Again though, be careful. Word defaults to putting recorded macros into normal.dot - which may not be where you want it.

Hint: always make a comment on the keyboard shortcut in the procedure. Like this:
Code:
 Sub NewFax()
' keyboard shortcut = Alt-F
   Documents.Add Template:="c:\test\tektips.dot"
End Sub

Pressing Alt-F would clone a new document using the template c:\test\tektips.dot

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top