View Single Post
 
Old 02-08-2015, 12:11 AM
yinswenti yinswenti is offline Mac OS X Office for Mac 2011
Novice
 
Join Date: Feb 2015
Posts: 4
yinswenti is on a distinguished road
Default

Thanks Paul. But sorry that did not work for me. I did replace your file path with mine, but it just returned with errors when I ran the macro.

Quote:
Originally Posted by ptmuldoon View Post
Sorry, I misunderstood what you were trying to do.

I just recorded a macro to open a template I use. I'm in Windows, but could be slightly different under Mac. It looks like the below

Code:
Public Sub OpenTemplate()
'
' Macro1 Macro
'
'
    Documents.Add Template:= _
        "C:\Users\paul.muldoon\Documents\Custom Office Templates\Blank_Report_Template.dotm" _
        , NewTemplate:=False, DocumentType:=0
End Sub
I have that included in a Word Add-In in my Word Startup folder. I then added a button to the QAT to call that macro, which opens the Report Template. You could also likely recorded a KeyStroke Short cut and place it AutoExec Macro

Code:
Sub AutoExec()
     With Application
         ' \\ Do customization in THIS document
         ' .CustomizationContext = ThisDocument
         
         ' \\ Add keybinding to this document Shorcut: Control-Alt+L
        .KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyAlt, wdKeyL), _
        KeyCategory:=wdKeyCategoryCommand, _
        Command:="OpenTemplate"
   End With
End Sub
Reply With Quote