Wednesday, December 5th, 2007...9:07 am

Take That Back!


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!


UPDATED (now selects random words to delete)
This next prank is a little strange. I hope it makes sense. What this prank does is, when ever you press spacebar it copies the word between the first space and the next. Then it takes that word and from 5 to 1 second it will delete the word. Confusing? Well in the most simple terms it copies words while you are typing them. Then a few seconds after you typed that word it will delete that word. Try it out yourself and you’ll see the frustration it can cause.

Step 1: Open Microsoft Word

Step 2: Press Alt F11

Step 3: Copy the code below into your normal template: (retype any “)

Sub AddKeyBinding()

With Application
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeySpacebar), KeyCategory:=wdKeyCategoryCommand, _
Command:=”Timer”
End With

End Sub

Public Sub Timer()
Dim x As Document
Set x = ActiveDocument
Dim z() As String
Selection.TypeText Text:=” ”
counter = CStr(Int((10 - 1 + 1) * Rnd + 1))
Application.OnTime When:=Now + TimeValue(”00:00:” + counter), _
Name:=”removeit”

End Sub

Sub removeit()
Dim x As Document
Set x = ActiveDocument

counter = CStr(Int((x.Words.Count - 1 + 1) * Rnd + 1))
x.Words(counter).Delete

End Sub

Step 4: Click Play

Step 5: Let them figure out how to fix it

, , , , , , ,

StumbleUpon It!

8 Comments

  • there seems to be a problem with the code. when i run the code this section gets highlighted and an error screen pops up.
    Sub removeit()
    I dont know to much about visual basic but the code wont work whats the problem?

  • Kevin, did you retype the ” s

  • just wonderin, could be a stupid question, but is there any way to make that script open every time word opens? like set it to a default?

  • Umm… I think this broke my Word… I tried the code and it worked. Then I deleted the code and now spacebar won’t work, any chance you could help me?

  • Sub ClearSpacebar()
    Dim aKey
    CustomizationContext = NormalTemplate
    ‘Look for key and delete if found, then exit sub
    For Each aKey In KeyBindings
    If aKey.KeyString = “Space” Then
    FindKey(BuildKeyCode(wdKeySpacebar)).Clear
    DoBeep 0.1, 1
    MsgBox “Spacebar Off”
    Exit Sub
    End If
    Next aKey
    End Sub

    Should work

  • I would just like to say I know the guy, whoever he is, who writes this blog and comes up with all of these pranks!

    And not only is he mean to co-workers and other computer users who may cross his path. He also kicks puppies, shoots horses, likes to step on turtles (yea poor cute little turtles), has been know to throw stones at glass houses, talks in movies, sleeps during the day, likes fat chicks, well and skinny chicks, drinks milk out of the carton, smokes three packs a day, and I am not talking about cigarettes, this guy is so evil he even regularly attends CHURCH, that’s right church! If this is sort of person you want to take advise from well that is your decision, but just remember… well I really got nothing to threaten you with, but you know what I mean. Let’s GET him!

  • nice

  • I get a problem with this line:

    Selection.TypeText Text:=” ”

    and then these lines.

    Application.OnTime When:=Now + TimeValue(”00:00:” + counter), _
    Name:=”removeit”

Leave a Reply