Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Jeff Lowenstein Jeff Lowenstein is offline
external usenet poster
 
Posts: 14
Default Word 2007 Macro & quick access toolbar

I would like to create a button on the quick access toolbar that creates a
new document based on a particular template. How do I do this? Please
explain in detail.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word 2007 Macro & quick access toolbar

Jeff Lowenstein wrote:
I would like to create a button on the quick access toolbar that
creates a new document based on a particular template. How do I do
this? Please explain in detail.


Install this macro in your Normal.dotm template (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub MakeMyDoc()
Const MyTemplate = "MyTemplate.dotx"
On Error GoTo ErrHdl

Documents.Add Template:=MyTemplate
Exit Sub

ErrHdl:
If Err.Number = 5151 Then
MsgBox "Could not find " & MyTemplate
Else
MsgBox Err.Number & vbCr & Err.Description
End If
End Sub

Change the filename in quotes from "MyTemplate.dotx" to the actual name of
the template you want the button to use.

Then right-click the Quick Access Toolbar and choose Customize. In the
category dropdown, choose Macros. Select the MakeMyDoc macro and click the
Add button. If you want, you can select the macro name on the right-hand
list and click the Modify button, from which you can change the icon and the
mouseover text for the button.

A small complication: the macro assumes that the template exists in the
folder named as the User Templates folder in the File Locations option
dialog. If you store the template anywhere else, you'll need to include the
full path in the MyTemplate constant, such as

Const MyTemplate = "D:\Extra Templates\MyTemplate.dotx"

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
blank document in Quick Access toolbar (Word 2007) Kathryn Microsoft Word Help 2 November 21st 07 01:52 PM
Word 2007 - Quick Access Toolbar Erika Microsoft Word Help 1 September 14th 07 01:37 AM
Word 2007 How to put a short cut on the quick access toolbar JERRY[_2_] New Users 2 August 4th 07 08:13 PM
quick access toolbar in Word 2007 Jackie D Microsoft Word Help 1 March 3rd 07 07:43 AM
quick access toolbar in Word 2007 Renee [MSFT] Microsoft Word Help 0 March 2nd 07 11:24 PM


All times are GMT +1. The time now is 07:24 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"