J
jbickel
I created the Macros as Greg suggested but I am having a problem with it
working. These macros were added to a template other than Normal.dot and I
have placed the template in the startup folder. What I am finding is the
first time I open MS Word the macros are not working. If I closed the
initial document and create a new document the macros work. Does anyone know
how I can get it working on the document that opens first?
"I would create a
template with the following macros and use it for documents that you want use
this feature for:
Sub AutoNew()
'Assigns the Macro1 Macro to the ENTER Key
CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), _
KeyCategory:=wdKeyCategoryMacro, Command:="Macro1"
End Sub
Sub AutoOpen()
'Assigns the Macro1 Macro to the ENTER Key
CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), _
KeyCategory:=wdKeyCategoryMacro, Command:="Macro1"
End Sub
Sub AutoClose()
CustomizationContext = ActiveDocument.AttachedTemplate
FindKey(KeyCode:=BuildKeyCode(wdKeyReturn)).Disable
'Disables prompt to save template changes
Templates(1).Save
End Sub
Sub Macro1()
'
' Macro1 Macro
' Macro recorded December 1, 2004 by CDR Gregory K. Maxey
'
Selection.TypeText Text:=Chr(11)
End Sub"
working. These macros were added to a template other than Normal.dot and I
have placed the template in the startup folder. What I am finding is the
first time I open MS Word the macros are not working. If I closed the
initial document and create a new document the macros work. Does anyone know
how I can get it working on the document that opens first?
"I would create a
template with the following macros and use it for documents that you want use
this feature for:
Sub AutoNew()
'Assigns the Macro1 Macro to the ENTER Key
CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), _
KeyCategory:=wdKeyCategoryMacro, Command:="Macro1"
End Sub
Sub AutoOpen()
'Assigns the Macro1 Macro to the ENTER Key
CustomizationContext = ActiveDocument.AttachedTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), _
KeyCategory:=wdKeyCategoryMacro, Command:="Macro1"
End Sub
Sub AutoClose()
CustomizationContext = ActiveDocument.AttachedTemplate
FindKey(KeyCode:=BuildKeyCode(wdKeyReturn)).Disable
'Disables prompt to save template changes
Templates(1).Save
End Sub
Sub Macro1()
'
' Macro1 Macro
' Macro recorded December 1, 2004 by CDR Gregory K. Maxey
'
Selection.TypeText Text:=Chr(11)
End Sub"