how do I create a button for template?

J

james

I have a template. I want to make one button in the word taskbar to open it..
How can I do that

Thanks.
 
J

Jezebel

I assume you mean to create a document from the template rather than open
the template itself: Create a desktop shortcut to the template file, drag it
to the toolbar.
 
G

Guest

Is it possible to create a button using a macro to open a
template? (not creating a shortcut on the window
desktop).
I'd like to place a button somewhere on MS-word menu bar
or a wordspace..

If possible, please let me know...

Thanks..
 
J

Jezebel

Yes of course. Create a macro to open the template (or create a new document
from the template, whichever you mean), then right-click the toolbar, select
customize, add a new button and associate it with your macro.
 
L

Laura Townsend

Hi James,

This is what I use. I have this macro in a global template (which is in my
word startup directory) and then I create a button for this macro on a
toolbar. This loads a template named "letter.dot" that is in the user's
workgroup directory. If you know the exact path, you can just type the path
instead of having word tell you what the workgroup directory is. You can
also just record a macro of yourself loading the template and then look at
the code in it for steps.

Sub NewLetter()
Dim WorkGroupPath As String
'this gets the workgroup path on the computer
WorkGroupPath = Options.DefaultFilePath(wdWorkgroupTemplatesPath)
'the workgroup path may not end in "\" -- if it doesn't, this adds it to it.
If Right(WorkGroupPath, 1) <> Application.PathSeparator Then _
WorkGroupPath = WorkGroupPath & Application.PathSeparator
'here you are starting a document based on the template! You could just
type the whole
'template path/name here and skip the above stuff if you want.
Documents.Add Template:=WorkGroupPath & "DSM Letter.dot", _
NewTemplate:=False, DocumentType:=0
End Sub

HTH
Laura
 

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