Discussion:
Enter key doesn't work
(too old to reply)
Jeff S
2007-04-08 14:14:01 UTC
Permalink
Hello All,

I am unsure if this is the correct newsgroup for this question so I have
cross-posted to vba.general and to application.errors. My apologies if that
is inappropriate.

I created a template in Word 2003 and when I type in the document, the Enter
key doesn't do anything. At all.

* I am using Word 2003 on a WinXP Pro SP2 system w/ 2 GB RAM.
* I have not assigned any macros, AutoText, styles, or anything to the
Enter key and I am not using KeyBinding in my VBA code.
* I am intercepting some Word commands but I can't believe they have
anything to do with it. I am intercepting:
- FileSave
- FileSaveAs
- DecreaseIndent
- IncreaseIndent
- NextCell
- PrevCell
* I did use KeyBinding in a previous incarnation of the template before I
remembered I could trap the ...Indent and ...Cell commands. That keybinding
did play with the Enter key. But after I removed the Keybinding code, I took
another precaution and started a new document and imported the "Word Command"
code module, which was wholly separate from the "KeyBinding" module.
* The Enter key works as expected in other documents.

Does anyone have an idea of what might be wrong? This is really perplexing
me and I am frustrated beyond measure. Any insight is most appreciated.

Thanks,
- Jeff
Klaus Linke
2007-04-08 19:52:41 UTC
Permalink
Hi Jeff,

Perhaps some KeyBinding for the Enter key still exists from your
experiments?

Dim aKey As KeyBinding
CustomizationContext = NormalTemplate
' or if you played around elsewhere, try other locations, say...
' CustomizationContext = ActiveDocument
' CustomizationContext = ActiveDocument.AttachedTemplate
For Each aKey In KeyBindings
If aKey.KeyCode = wdKeyReturn Then
MsgBox "Probably found the culprit!"
aKey.Clear
End If
Next aKey

Regards,
Klaus
Post by Jeff S
Hello All,
I am unsure if this is the correct newsgroup for this question so I have
cross-posted to vba.general and to application.errors. My apologies if that
is inappropriate.
I created a template in Word 2003 and when I type in the document, the Enter
key doesn't do anything. At all.
* I am using Word 2003 on a WinXP Pro SP2 system w/ 2 GB RAM.
* I have not assigned any macros, AutoText, styles, or anything to the
Enter key and I am not using KeyBinding in my VBA code.
* I am intercepting some Word commands but I can't believe they have
- FileSave
- FileSaveAs
- DecreaseIndent
- IncreaseIndent
- NextCell
- PrevCell
* I did use KeyBinding in a previous incarnation of the template before I
remembered I could trap the ...Indent and ...Cell commands. That keybinding
did play with the Enter key. But after I removed the Keybinding code, I took
another precaution and started a new document and imported the "Word Command"
code module, which was wholly separate from the "KeyBinding" module.
* The Enter key works as expected in other documents.
Does anyone have an idea of what might be wrong? This is really perplexing
me and I am frustrated beyond measure. Any insight is most appreciated.
Thanks,
- Jeff
Jeff S
2007-04-09 14:02:02 UTC
Permalink
You were quite right, Klaus. I thought I had removed the KeyBinding but it
was still there.

Thanks for your help!
-jeff
Post by Klaus Linke
Hi Jeff,
Perhaps some KeyBinding for the Enter key still exists from your
experiments?
Dim aKey As KeyBinding
CustomizationContext = NormalTemplate
' or if you played around elsewhere, try other locations, say...
' CustomizationContext = ActiveDocument
' CustomizationContext = ActiveDocument.AttachedTemplate
For Each aKey In KeyBindings
If aKey.KeyCode = wdKeyReturn Then
MsgBox "Probably found the culprit!"
aKey.Clear
End If
Next aKey
Regards,
Klaus
Post by Jeff S
Hello All,
I am unsure if this is the correct newsgroup for this question so I have
cross-posted to vba.general and to application.errors. My apologies if that
is inappropriate.
I created a template in Word 2003 and when I type in the document, the Enter
key doesn't do anything. At all.
* I am using Word 2003 on a WinXP Pro SP2 system w/ 2 GB RAM.
* I have not assigned any macros, AutoText, styles, or anything to the
Enter key and I am not using KeyBinding in my VBA code.
* I am intercepting some Word commands but I can't believe they have
- FileSave
- FileSaveAs
- DecreaseIndent
- IncreaseIndent
- NextCell
- PrevCell
* I did use KeyBinding in a previous incarnation of the template before I
remembered I could trap the ...Indent and ...Cell commands. That keybinding
did play with the Enter key. But after I removed the Keybinding code, I took
another precaution and started a new document and imported the "Word Command"
code module, which was wholly separate from the "KeyBinding" module.
* The Enter key works as expected in other documents.
Does anyone have an idea of what might be wrong? This is really perplexing
me and I am frustrated beyond measure. Any insight is most appreciated.
Thanks,
- Jeff
Continue reading on narkive:
Loading...