Celeb Glow
general | February 27, 2026

Is there a way to disable MS Word 2010's file close (ctrl+w) short cut?

There was a mishap where CTRL+W was pressed on a long document that wasn't saved yet, and all of that unsaved work was gone. Is there a way to disable MS Word 2010's file close short cut?

1

2 Answers

Yes, but realise it's only for your computer. If you move computers, the keyboard shortcut will still exist.

  1. In Word 2010, press File, Options.
  2. Open the Customize Ribbon tab.
  3. Press the Keyboard shortcuts: Customize... button at the bottom of the left-hand list.
  4. Select Category All Commands, Command DocClose.
  5. Select the current key Ctrl+W and press the Remove button at the bottom of the window.
  6. Press Close, then OK.

If you want to see the name of a command that's mapped to a keyboard shortcut, you can type the shortcut in the Press new shortcut key box and it will tell you the name of the command that uses that shortcut. For example, press Ctrl+N and it will say "Currently assigned to: FileNewDefault".

There is a way!

Code it's VB code so the format crashes better-look version on my GitHub page and just modify the BuildKeyCode(wdKeyBackspace) to BuildKeyCode(wdKeyControl,wdKeyW).

Attribute VB_Name = "NewMacros"
Public backspace_disabled As Boolean
Sub disable_backspace()
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyB, wdKeyShift, wdKeyControl), KeyCategory:=wdKeyCategoryMacro, Command:="print_hello_world"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyBackspace), KeyCategory:=wdKeyCategoryMacro, Command:="empty_function"
End Sub
Public Sub print_hello_world()
Dim aKey As KeyBinding
For Each aKey In KeyBindings If aKey.KeyCode = BuildKeyCode(wdKeyBackspace) Then If backspace_disabled Then MsgBox ("disable_backspace") 'KeyBindings.Add backspace_fake aKey.Rebind KeyCategory:=wdKeyCategoryMacro, Command:="empty_function" Else 'FindKey(BuildKeyCode(wdKeyBackspace)).Execute MsgBox ("enable_backsapc") 'MsgBox ("bye") aKey.Disable End If End If
Next aKey
backspace_disabled = Not backspace_disabled
End Sub
Public Sub empty_function()
End Sub

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy