The rand "virus": or how to insert dummy text into a document
Article contributed by Suzanne Barnhill
Like jokes, urban legends, and virus hoaxes, tips about Word's little-used
or undocumented features periodically makes their way around the Internet,
occasioning a wave of postings in Word newsgroups. One of these is =rand(),
which is sometimes represented as an Easter egg, sometimes feared as a
possible virus. It is neither. It is a Word function (undocumented in the
online Help but documented in the Microsoft Knowledge Base) that can be
useful in certain circumstances.
The rand function
The Microsoft Knowledge Base article How to Insert Sample Text into a
Document in Word [212251] explains the use and syntax of the function:
Microsoft Word allows you to quickly insert sample text into a document.
To do this, type =rand() in the document where you want the text to appear,
and then press ENTER.
The inserted text is that hardy perennial: "The quick brown fox jumps over
the lazy dog," which contains every letter in the English alphabet.
By default, the sample text contains three paragraphs, each containing five
sentences. You can control how many paragraphs and sentences appear by
adding numbers inside the parentheses, for instance:
=rand(3,4)
The first number is the number of paragraphs, and the second the number of
sentences per paragraph. If you omit the second number, you get five
sentences in each paragraph. So, for example:
=rand(3,4)
inserts three, four-sentence paragraphs, while:
=rand(10)
inserts ten, five-sentence paragraphs.
The maximum number for either parameter is 200 and may be lower depending on
the number of paragraphs and sentences specified. For instance, if you
specify 200 paragraphs, then the maximum number of sentences per paragraph
you can specify is 99:
=rand(200, 99)
If you specify 200 sentences per paragraph, then the maximum number of
paragraphs you can specify is 99.
Admittedly, this function serves a useful purpose for filling a page when
you're designing a template and want to see how it will look with text in
it. It's also easy to see how users can be alarmed and fear this is a virus
when someone suggests they try "=rand(200,99)," which quickly blows up into
a giant document! (Incidentally, part of the instructions in some versions
is to "Make sure there is a space between = and rand and a space between
rand and (200,99)." This actually makes no difference: the function works
equally well with and without spaces.)
A better method of creating dummy text
Although the rand function is quick and easy, the text it produces is not
very natural. All the paragraphs are the same length, and, because every
sentence is the same, the lines will tend to break in the same places. The
result is that some possible formatting problems may be masked. Another,
more useful, possibility, therefore, is to use "Greek" or "lorem ipsum"
text.
Because this kind of dummy text is very commonly used by designers (because
it gives a natural look without distracting content), you've probably seen
examples of it. Microsoft even used it in the Microsoft TrueType Font
Assistant (version 1.1) in Windows 3.x. According to the Microsoft Knowledge
Base article: What 'lorem ipsum dolor sit amet' Means (Q114222):
The phrase "Lorem ipsum dolor sit amet" appears in Microsoft TrueType Font
Assistant for each example of the fonts available. This phrase has the
appearance of an intelligent Latin idiom. Actually, it's nonsense .... It's
used because the letters involved and the letter spacing in those
combinations reveal at their best the weight, design, and other important
features of the typeface.
"Although the phrase is nonsense," the article continues, "it does have a
long history." If you're curious about that history, follow the link above.
The Lorem ipsum text is also discussed at The Free Online Dictionary of
Computing, which adds that: "The point of using this text, or some other
text of incidental intelligibility, is that it has a more-or-less normal
(for English and Latin, at least) distribution of ascenders, descenders, and
word lengths, as opposed to just using 'abc 123 abc 123', 'Content here
content here', or the like."
If you want to use the text, here's how:
1.
A sample of "lorem ipsum" text is provided below. Copy it and paste it
into a Word document.
2.
You may want to duplicate the text (to expand it) and edit it to create
longer and shorter paragraphs, add some dummy headings, or the like. (The
chunk I have saved is about a page long, which is a useful size; you can
always truncate it as needed.) Needless to say, you can break the text
anywhere - not just between sentences.
3.
To keep Word's spelling checker from going crazy when you use this
text, do it (and yourself) a favor by selecting the text and choosing "(no
proofing)" as the language under Tools | Language | Set Language.
4.
To save the text as an AutoText entry, select it, press Alt+F3, and
type in a name for your AutoText entry. (After some experimentation, I
settled on "lorem"; now whenever I type "lore" and press Enter, the text is
inserted.)
Here's the text:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut
wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros
et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril
delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum
soluta nobis eleifend option congue nihil imperdiet doming id quod mazim
placerat facer possim assum.
One caveat about the above sample: it does not contain every letter in the
English alphabet. If it is important for testing purposes that you include
every letter, then you are better off with quick brown foxes.
http://word.mvps.org/FAQs/Formatting/DummyText.htm
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <balita-anda@balita-anda.com>
Sent: Tuesday, July 12, 2005 12:36 PM
Subject: [balita-anda] oot donk: KOK BISA...?????
Dear guys,
This is a very funny thing. check it out......
Bill Gates still doesn't know why it happens, it was discovered by a
Brazilian, just test it....
buka Microsoft Word and ketik :
=rand (200,99)
kemudian ENTER !!
AYO GALANG SOLIDARITAS UNTUK MEMBANTU KORBAN MUSIBAH DI ACEH & DAN SUMATERA
UTARA !!!
================
Kirim bunga, http://www.indokado.com
Info balita: http://www.balita-anda.com
Stop berlangganan/unsubscribe dari milis ini, e-mail ke: [EMAIL PROTECTED]
Peraturan milis, email ke: [EMAIL PROTECTED]