Getting easy space-filler text from Word with three simple "macros"

Posted: (EET/GMT+2)

 

Sometimes, you need to quickly get some (long) text as a space-filler. Just yesterday, I needed such filler text in one ASP.NET web application I'm writing, but finding a suitable text can be difficult. Of course, you could copy text from some web page (my favorite is some news site), but that could easily lead to broken line breaks, special characters, and so on.

If you have Word, then creating filler texts is easy. Just make sure you have AutoCorrect enabled (by default it is), and then write any of the following "macros" to your document:

  • =lorem()
  • =rand()
  • =rand.old()

Each of these macros can be written to an empty spot in your document. After you have types for instance "=lorem()", just hit Enter, and text gets inserted into your document.

You can even control how much text gets generated: type in number values inside the parenthesis like this: "=rand(10,3)". The result is ten paragraphs of text with three sentences in each. Quickly fills up a printed page!

For more details, check out the Microsoft knowledge base article 212251.