Hi folks
I'm trying to work out how to keep Word 2003's AutoText function intact after creating a key binding for the Enter key.
With the key binding set, AutoText gets as far as bringing up the auto-complete suggestion tip, but pressing Enter does not add the text (as it's just following the instructions in the macro).
I could, in theory, remove the Enter customisation completely, but I'd prefer not to as I want a couple of things to happen like updating fields and populating the status bar with a message.
Is there any way of overcoming this? Here's how my coding looks:
Quote:
Sub SetSmartKeys()
CustomizationContext = ActiveDocument
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyReturn), KeyCategory:= _
wdKeyCategoryMacro, Command:="SmartEnter"
End Sub
|
Quote:
Sub SmartEnter()
' Word default action
Selection.TypeParagraph
' Update fields, then show some tips in the status bar
Application.Run MacroName:="UpdateFields"
Application.Run MacroName:="SmartKeyHelp"
End Sub
|
Without this key customisation, the AutoText function works normally.