Thursday, November 22nd, 2007...9:06 pm
Macro Pranks
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!
Here is another simple but annoying key binding prank. What this one will do is magnify the person’s word document to 500%, every time they press a certain letter. If you are really mean, you can bind multiple keys so they will have trouble narrowing down the problem. Steps are as follows
Step 1: Open Microsoft Word
Step2: Press Alt F11
Step3: Double click on the “this document” under the normal template
Step4: Copy this code
Sub AddKeyBinding()
With Application
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyC), KeyCategory:=wdKeyCategoryCommand, _
Command:=”TestKeybinding”
End With
End SubSub TestKeybinding()
Dim x As Document
Set x = ActiveDocument
ActiveDocument.ActiveWindow.View.Zoom.Percentage = 500
Selection.TypeText Text:=”c”
End Sub
Step 5: Save and Close
What this will do is when ever the letter “C” is typed it will increase the zoom to 500%. Easy to fix but very annoying. The key to this one is that the code types the letter C for them. That way they don’t catch on.
COmPuTer pRAnKs, Computer Tricks, macro pranks, macros
12 Comments
November 27th, 2007 at 7:50 am
Ooh this would be annoying…
And different levels of zoom associated with random keys would be funny.
*opens Word and starts messing with vba*
November 27th, 2007 at 8:27 am
Yes it is very simple to add more zoom levels. Just change the Key and play with the code. If you know what your doing it would take 2 minutes
November 28th, 2007 at 11:27 am
this is fckin pure evil man! I love it!
November 28th, 2007 at 8:26 pm
HAHA!, thats pretty epic.
I’ll take any and every chance to sabotage a windows machine.
long live the GNU revolution
….
shut up im drunk. (o.o)
November 29th, 2007 at 7:09 pm
you can do similar things in OOo
November 29th, 2007 at 7:15 pm
I have tried these codes and they work well but after closing the Word they do not work anymore. How come? Tried on MS Office ‘03 and ‘07
December 2nd, 2007 at 10:17 pm
Do these work on Macs? Because they’re not working for me… on a mac. I”m using microsoft word 2007
December 7th, 2007 at 4:45 am
How to undo this prank? I deleted the code, but he can’t write the letter e now.
December 11th, 2007 at 10:25 pm
I’m having the same problem as Yellow, except with “c”. Any suggestions?
December 17th, 2007 at 12:08 pm
Hi - regarding the missing c and e’s.
You should be able to find a working version of your normal.dot, normal.dotm in the following folder:
C:\Documents and Settings\\Application Data\Microsoft\Templates
You should be able to use one of the dot files in here. That will restore your missing letters.
Cheers,
-TDB
February 28th, 2008 at 7:36 am
Alternatively, I believe you can use the Keybindings.ClearAll method as well to re-enable the “c” & “e” keys or any other key that was previously disabled….correct?
February 28th, 2008 at 8:21 am
@Xiaichou
You can do that but I tend to remove only the key binding I created. Because if you have any keybindings you want to still use it will clear those with it.
Leave a Reply