Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
blank document in Quick Access toolbar (Word 2007) | Microsoft Word Help | |||
Word 2007 - Quick Access Toolbar | Microsoft Word Help | |||
Word 2007 How to put a short cut on the quick access toolbar | New Users | |||
quick access toolbar in Word 2007 | Microsoft Word Help | |||
quick access toolbar in Word 2007 | Microsoft Word Help |