One of Word’s quirky, tucked-away features is the rand() function. It lets you quickly insert a block of text in a document. To use the function in pre-2007 versions of Word, at the beginning of a line type =rand() and press Enter. Word inserts three paragraphs, each containing five sentences like this:

The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

To vary the number of sentences and paragraphs produced, add parameters to the function. For example, =rand(5,7) produces five paragraphs each containing seven sentences, while =rand(15,2) produces 15 paragraphs containing two sentences each.

Why would you want to do this? Well, it’s useful if you want to try out formatting or quickly whip up a document to demonstrate some of Word’s features. The sentence contains all the letters of the alphabet, so it’s particularly handy when you want to compare fonts.

In Word 2007, rand() gets a makeover. It no longer displays a sentence containing all the letters in the alphabet; instead, it produces three paragraphs of text explaining how to perform basic formatting actions.

It’s a shame Microsoft didn’t take this a bit further and include a sizeable number of Word 2007 tips rather than the meagre three paragraphs offered; that would have made rand() a really useful training aid. As it is, although you can no longer use rand() to display all the characters in a particular font, the more varied text – nine different sentences instead of the dizzingly repeated “quick brown fox” – makes rand() much more useful as a formatting aid. Use the text to test how page flow works in a document template or for positioning pictures or tables in a page and then flowing the text around them.

For the curious, the maximum value for rand is rand(200,99) or rand(99,200). If you try that in Word 2007 you’ll end up with almost half a million words inserted into your document and, if your PC isn’t speedy, a long wait. Use with caution!