3/3/13

Tip #31 - Generating Random Text


100 Computer Tips in 100 Days

Tip #31 - Generating Random Text


OK, I can hear you asking yourself, “why would I want to generate random text?” Just bear with me.  There are many occasions when I need to do this and it’s very cool so I’m sharing it with you.

The programmers at Microsoft often need to generate random text to test software so they built in a secret macro that will produce a specific number of sentences and paragraphs made up of real words, not computer Latin words. Try this out in your Microsoft Word program.

Open a document in Word and type the following then press the enter key (return in Apple world):
=rand(5,7) d

Presto, the code you typed changed to five paragraphs each containing seven sentences. Keep in mind that the five and seven could be any two numbers depending on how much random text you need. So the next time you need to demonstrate something in Word to a colleague and you need some text to use, remember the code. It’s pretty easy if you keep in mind that rand stands for random.

If you would rather have Latin words rather than distracting English words, you can do that too. Type =lorem(5,7) in your document and then press the enter (return) key and it’s replaced with Latin text. Remember the five and seven can be any numbers you choose.

You can use this tip when you’re trying to show coworkers some special word thing and need to have some text to practice on. 

Happy computing!

No comments:

Post a Comment