Top 10 List

Computer Prank – Spelling Bee

  • Author: Iambetterthanu.com
  • Filed under: Computer Pranks
  • Date: Dec 12,2007

If you read my blog there is one thing you know for sure, I’m not going to win any spelling contest any time soon. I get comments all the time from the grammar/spelling police, ” Learn how to use spell check, dumb@$!@ “. I wrote this macro for those people. What this macro does is when ever you load word, it creates a custom dictionary. This custom dictionary contains common words, but misspelled. Whenever you type its correct equivalent it then misspells the word. This normally would have an big red squally line below but the custom dictionary takes care of that. The misspelled word now looks nice and perfect, because Word thinks its perfect. So how do you do it?

Step one
Open up Microsoft Word

Step two
Press alt f-11 ( This opens the code view )

Step three
Open your normal template. It is under Normal… Microsoft Word Objects… ThisDocument… Double click on this document

Step four
Copy the Code Below

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

Step5: Press Save

Step6: Close Word

Step7: Enjoy

If you have done this correctly you will now have a custom dictionary with misspellings galore. Every time they load word it will load this dictionary and the misspellings to get with it. Even if they were to delete the dictionary it self the code will recreate it every time.

Extras

To add more words then “TEH” there are few things you will have to do.

  • Copy the line Print #fnum, “teh”
  • Paste Print #fnum, “teh” right below where you copied it on to the next line
  • The new line you just pasted Print #fnum, “teh” Change the word “teh” to what ever word you would like
  • Next add the key change
  • Copy the code
    • 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
  • Paste the code below the code you just copied on the line below
  • Change .Text=”the” and .Replacement.Text=”teh” with the original word and the word you want it to change to.

All done. You could make this more efficient but for simplicity sake we will just copy and paste.

How do you undo it?

Replace the code you put in originaly with this and click the run button

FindKey(BuildKeyCode(wdKeyControl, wdKeyAlt, wdKeyA)).Clear
application.CustomDictionaries.ClearAll



Student Credit Cards


3 Responses for "Computer Prank – Spelling Bee"

  1. Bendito December 13th, 2007 at 8:08 am

    Ironic you have a typo in you(r) instructions.

  2. nadinengland December 13th, 2007 at 10:27 am

    @ Bendito:

    He did say that he was a criminal of the grammar police though, at least he admits it.

    Ha very good, can see this coming in handy at college sometime in the near future.

  3. tzzler44 October 28th, 2008 at 7:54 pm

    could you rewrite this code for word 2007? I need to use this on my roommate.


Leave a comment


Recent comments