English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I try to do a key-combination, like Alt-C, and a window pops up that says
"Code execution has been interrupted" and has choices like Continue, End, Debug, Help. What do I do? Can I fix this, or do I have to replace "normal.doc" with a backup copy?

2007-01-31 00:18:10 · 1 answers · asked by Robin W 7 in Computers & Internet Other - Computers

1 answers

Does talking about normal.doc mean your are dealing with VBA for MSWord? I suppose so. (the following works for word 2003 and 2007)

Open a new word file
From VBE (press ALT+F11) double-clic on thisDocument and on the right-hand-side window paste the code below

Sub mykey()
Dim kbLoop As KeyBinding
CustomizationContext = NormalTemplate
For Each kbLoop In KeyBindings
Selection.InsertAfter CustomizationContext & vbTab & kbLoop.Command & vbTab & kbLoop.KeyString & vbCr
Selection.Collapse Direction:=wdCollapseEnd
Next kbLoop
End Sub

this macro will list all the macros bound to a key combination (like ALT + C in your case) and will give you :
the key combination and the macro which is triggered by the keys

Then If you want to delete this key combination paste the code below
Sub delkeyassignment()
Dim kbLoop As KeyBinding
CustomizationContext = NormalTemplate
KeyBindings.ClearAll
end sub

this code clears the customized key assignments in the Normal template. The key assignments are reset to the default settings.

2007-01-31 01:53:25 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers