ABrown
09-01-2008, 05:59 AM
I have a template that contains the following code which runs on AutoOpen:
'Sub indent()
' Selection.Range.ListFormat.ListIndent
'End Sub
'Sub decrease()
' Selection.Range.ListFormat.ListOutdent
'End Sub
'
'Sub AssignTabKey()
'
'KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyTab), KeyCategory:= _
'wdKeyCategoryMacro, Command:="indent"
'End Sub
'
'Sub AssignShiftTabKey()
'KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyShift, wdKeyTab), KeyCategory:= _
'wdKeyCategoryMacro, Command:="decrease"
'End Sub
This is too assign the indent key and decrease indent key to the tab and shift and tab. This is because the template has all built in tabs removed for formatting purposes (we have to remove them as we have our schedule headings centered but need them indented in the TOC so have to have a tab applied after in the numbering setup).
The problem is - when I use normal - which doesn't contain this code on AutoOpen the tab key does not work - only by using control and tab.
I thought that the code for the template would not affect the Normal.dot template if it wasn't contained in it, but I am obviously not getting something with regard to key bindings. Can I set the keybinding for the tab key back to the tab key when I open Normal?
Thanks for any help - really stuck on this....
Annette
'Sub indent()
' Selection.Range.ListFormat.ListIndent
'End Sub
'Sub decrease()
' Selection.Range.ListFormat.ListOutdent
'End Sub
'
'Sub AssignTabKey()
'
'KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyTab), KeyCategory:= _
'wdKeyCategoryMacro, Command:="indent"
'End Sub
'
'Sub AssignShiftTabKey()
'KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyShift, wdKeyTab), KeyCategory:= _
'wdKeyCategoryMacro, Command:="decrease"
'End Sub
This is too assign the indent key and decrease indent key to the tab and shift and tab. This is because the template has all built in tabs removed for formatting purposes (we have to remove them as we have our schedule headings centered but need them indented in the TOC so have to have a tab applied after in the numbering setup).
The problem is - when I use normal - which doesn't contain this code on AutoOpen the tab key does not work - only by using control and tab.
I thought that the code for the template would not affect the Normal.dot template if it wasn't contained in it, but I am obviously not getting something with regard to key bindings. Can I set the keybinding for the tab key back to the tab key when I open Normal?
Thanks for any help - really stuck on this....
Annette