Skip To Main Content

Menu

Main Content

Oct 30

Written by: Senior Instructor
10/30/2007 12:30 PM

After creating a new macro in Word, I usually require a document with sample text that I can use to test the macro. I found that one way to accomplish this is to use the rand() function in Word. This function prints the sentence The quick brown fox jumps over the lazy dog as many times as you need it to. (BTY - This is an example of a "pangram"- a sentence or phrase that uses all the letters of the alphabet at least once.)

To generate the text, open a new blank document and then type =rand(p,s), where p is the number of paragraphs you need and s is the number of sentences per paragraph. Then press Enter. Word will automatically create the text. (The autocorrect while typing option must be active for this feature to work.)

Tags: