
Tips.Net > WordTips Home > Editing > Repeating Actions
Summary: Pressing F4 or Ctrl+Y allows you to repeat the last action you took in Word. If you want to repeat an action more than a single time, you’ll need a macro to do the task. This tip presents a simple one that you can use to repeat an action any number of times. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
If you want to repeat an action a single time, you can either press the F4 key or Ctrl+Y. What if you want to repeat it more than once, however? Granted, you could press these keys multiple times, but this can get tedious if you want to repeat something fifty or sixty times.
The answer is to use a nifty little macro that will do the repeating for you. The follow macro will do the trick:
Sub DoRepeat()
Dim CountValue As Integer
CountValue = Val(InputBox("How many times?"))
If CountValue > 0 Then Repeat (CountValue)
End Sub
The trick is to assign DoRepeat to a keyboard shortcut, such as Alt+R. Then, you can perform an action, press Alt+R, enter the number of times to repeat, and be on your way. You should note that if the action you did prior to invoking the macro cannot be repeated for some reason, you will get an error when the macro tries to run.
Tip #1689 applies to Microsoft Word versions: 97 2000 2002 2003
Great Idea! Uncover the many ways you can master the full potential of printing your documents. WordTips: Printing and Printers can help you get the most from both the printed page and your printer.
If you provide support and help to others, you need the power offered in the WordTips Ten-Year Library. There is no better information repository anywhere! (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips