Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling a Word doc with arbitrary text 2

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,499
19
38
Scotland
www.ml-consult.co.uk
Many of you Office experts probably already know this, but it is new to me, and it might be new to some of you as well.

When designing the layout of a document in Word, it's often useful to fill it with text. It doesn't matter what the text is. You just want some words to be in place so that you can judge the layout, fonts, colours and so on. In the past, I've copied and pasted whatever text happens to be handy at the moment. It might be from another document, or from a website, or whatever.

It turns out that there is an easier way. Just type the following into the document, then hit Enter:

[tt]=rand(p,s[/tt])

where p is the number of paragraphs you want, and s is the number of sentences per paragraph. For example:

[tt]=rand(6,4)[/tt]

will give you six paras with four sentences per para.

When you hit Enter, the specified amount of text will appear at the insertion point. As far as I can make out, the text comes from an Office Help file, but you don't need to know that.

Graphical designers traditionally use so-called Lorem Ipsum text for this purpose. If that's what you want, you can type this:
[tt]
=lorem(p,s)[/tt]

where, again, p and s represent the number of paragraphs and sentences respectively.

If nothing else, this is a good illustration of the fact that, however well you think you know some software, there is always something new to learn. I've been using Microsoft Word for around 30 years, but I never knew this feature existed.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks for sharing Mike. I had no idea.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Yep, use both rand and lorem quite a lot

>the text comes from an Office Help file

used to be "The quick brown fox" but they changed that years back. But you can get the old one back by using [tt]rand.old[/tt] instead of just [tt]rand[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top