Member preview

How To Generate Random Text In Word

Picture from Licence: CCO

You know how sometimes you see Latin-looking placeholder text in documents? Well, you can generate that yourself in Word. But before I explain how, why might you wish to do so in the first place?

The most common and obvious reason is to see what a particular template or font looks like when it is applied to a body of text. Rather than copying and pasting text from another source, or typing it anew, you can save time by using a built-in macro.

Another reason to want to generate a great deal of text quickly is to get an idea of how a published report or book might look when there are 200 pages of it to bind and handle.

Here’s how you do it:

Type =lorem() and then press the Enter key. That will generate the familiar “lorem ipsum” text.

You can go further, and specify the number of paragraphs to generate, and the number of sentences in each paragraph. Thus the command =lorem(10,4) will generate a body of text comprising 10 paragraphs, each of which contains 4 sentences.

It will, of course, be obvious that in order to generate a vast number of pages you simply need to enter large numbers within the brackets. Much will hinge on the size of your font and the dimensions of the page layout, but experiment. For instance, try entering 200,10 and see how many pages that leads to. If the result is too many or too few, just press Ctrl A and then Delete, and start again!

The Rand Command

If Latin isn’t your thing, then you can still generate ordinary English text. Here’s a video on how to do this, or you can just carry on reading.

Type the following, and then press the Enter key:


As you can see, several paragraphs of Help text have been generated.

You can control how many paragraphs there are, and how many sentences you have in each paragraph. If you’d prefer to watch how to do this instead of reading about it, look at the very short screencast below.

More Control

Rather than typing =rand(), you can type =rand(x,y), where x is the number of paragraphs and y is the number of sentences in each one. Try it now, with low numbers that enable you to see what’s going on, such as =rand(1,6), which will produce one paragraph with six sentences, or =rand(6,1), which will give you six paragraphs with a single sentence in each.

If you need to check things like pagination, just type a number high enough to give you lots of paragraphs and sentences, and therefore several pages. For example, typing something like =rand(30,6) should do the trick.

The Old Rand Command

Until Office 2007, the rand command generated several paragraphs of that tried and traditional random text, The quick brown fox jumps over the lazy dog.I have to say that I preferred that, because it contains every letter in the English alphabet. If that’s your preference too, then type =rand.old() instead of =rand(). Again, to control the number of paragraphs and sentences, use the format =rand.old(x,y).

This article originally appeared in the Digital Education newsletter. Terry Freedman is a freelance writer. He publishes the ICT & Computing in Educationw website and the Writer’s Know-how website.

Helping each other write better.
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.

Only members of Medium may see responses to this story.