Autonumbering
with RoboHelp and Microsoft Word
By David A. Knopf
View
this tip in PDF format
Because of a bug in Microsoft Word (both Word
97 and Word 2000), it's difficult to number lists automatically. The Numbering
toolbar button
doesn't work
reliably, and neither does RoboHelp's Topic Text Numbered style. Even if you install
Microsoft's SR-1 or SR-2 patch to Word 97 or upgrade to Word 2000, you are still
likely to encounter problems with any complex numbered list formatting.
As
a result of these problems, many RoboHelp users have reverted to "manual"
list numbering, which is both time-consuming and error-prone. Using the procedure
described here, you can automate the process of creating numbered lists in Word
and completely insulate yourself from the Word bug that has plagued so many Help
authors.
To accomplish this, you'll need to take the following steps:
Create two AutoCorrect entries in Microsoft
Word. You'll save these AutoCorrect entries in your NORMAL
template (NORMAL.DOT). These AutoCorrect entries will make it possible
for you to type 1] whenever you want to start a new numbered list
and to type n] whenever you want to start a list item other than the
first one. Word will automatically convert these entries to Word field
codes that display as sequential numbers and will keep the numbers
up-to-date automatically.
Define a new style in your RoboHelp template.
You define the style and add it to your default RoboHelp template
(ROBOHELP.DOT). This is the style you'll use, instead of RoboHelp's
built-in Topic Text Numbered style, when you create numbered list
items.
Make the new style available in your Help project.
Before you can use the new style, you must ensure it is available
in the Help documents you've already created in your project.
Create numbered lists using the new style
and AutoCorrect entries.
Update numbering in your numbered lists.
All this is a little complicated
to set up the first time, but you only have to set it up once and it's well worth
the time. You may want to print this page so you can refer to it as you set things
up.
Create two AutoCorrect entries in Microsoft
Word
1. Create a new Word document based on the NORMAL.DOT template.
2. In Word, choose Tools > Options.
3. On the View tab of the Options dialog box, select
Field Codes.
4. Click OK.
5. Choose Insert > Field.
6. In the box at the bottom of the Field dialog box, replace the equal sign with the following
text: SEQ Step \r 1
7. Click OK.
8. Press Enter to start a new paragraph.
9. Choose Insert > Field.
10. In the box at the bottom of the Field dialog box, replace the equal sign with
the following text: SEQ Step \n
11. Click OK.
12. Highlight the first field you created (the one that says
SEQ Step \r 1). Be careful not to highlight
the paragraph mark at the end of the line.
13. Choose Tools > AutoCorrect.
14. In the Replace box, type:
1]
15. Click OK.
16. Highlight the second field you created (the one that says SEQ
Step \n). Be careful not to highlight the paragraph mark at
the end of the line.
17. Choose Tools > AutoCorrect.
18. In the Replace box, type:
n]
19. Click OK.
20. Choose File > Save to save the document, giving it
any name you want.
Click Yes to save changes
to the document template, as well. (You can delete this document if you want to;
it was useful only as a way to update the styles in the NORMAL.DOT template.)
N
O T E Since you created the AutoCorrect entries 1] and n] in NORMAL.DOT,
you can use them in any Word document, not just in the Help documents you create
in RoboHelp.
Define a new style in your RoboHelp template
1.
Open your Help project in RoboHelp.
2. In Word, choose Format > Style.
3.
In the Style dialog box, click the New button.
4. Enter a
Name for the style you'll use for numbered list items
(we
call it "Topic Text Step").
This should be a paragraph style that
does not include autonumbering but does include a hanging indent and a left tab
at the same position as the hanging indent. The Paragraph dialog box might
look something like this:

The ruler might look something like this:

N O T E (1) The exact format
settings you use will depend on the format of other elements in
your Help system. The above illustrations are for example only.
(2) For the Topic Text Step style, it's a good idea to set the Style
for following paragraphs in the New Style dialog box to Topic Text
Step. (3) The paragraph style illustrated here will result in numbers
that are left-aligned; if you prefer right-aligned numbers, see
Create right-aligned numbers.
5. Click the Save As RTF
toolbar
button on the RoboHelp toolbar in Word. Click Yes to save changes
to the document template, as well.
Make the new style available in your Help
project
Before you start creating numbered lists, you need to make sure the
new style you defined is available in your Help project. You can do
this by setting your Help documents to update their styles automatically
from the ROBOHELP.DOT template each time you open them or by manually
copying the new style from the ROBOHELP.DOT template to each of your
Help documents.
To set your Help
documents to update their styles automatically:
1.
Open your Help project in RoboHelp.
2. For each Help document in the project:
a. Open the document.
b. In Word, choose Tools > Templates & Add-Ins.
c. In the Templates & Add-Ins dialog box, select Automatically update document
styles.
d. Click OK.
e. Click the Save As RTF toolbar button
on
the RoboHelp toolbar in Word.
To transfer style
definitions manually:
1. Open your Help project in RoboHelp.
2.
For each Help document in the project:
a. Open the document.
b. In Word, choose Format > Style.
c. In the Style dialog box, click Organizer.
d. Use the Organizer dialog box to copy the new style
you created in ROBOHELP.DOT to your Help document.
Create numbered lists using the new style
and AutoCorrect entries
If you prefer to have the numbers in your numbered lists appear right-aligned,
see Create right-aligned numbers.
To create a numbered list in RoboHelp:
1. In your Help document, press Enter to start a new paragraph.
2. Apply the Topic Text Step style to the new paragraph.
3. Type 1]
4. Press the Tab key, and then type the text of the first item in
the numbered list.
5. For each subsequent item in the numbered list:
a. Press Enter to start a new paragraph.
b. Type n]
c. Press the Tab key, and then type the next item in the numbered list.
Update numbering in your numbered lists
Word updates the numbers in your SEQ fields only when you tell it
to. In other words, numbering is not automatically updated as it would
be if you were using Word's autonumbering "feature." However,
it takes just two keystrokes to update all the SEQ fields in your
document.
To
tell Word to update all the numbers
Select all the text in your document
(press Ctrl+A or choose Edit > Select All),
and then press F9.
A good time to do this is right before you compile.
Create right-aligned numbers
Some people prefer to have the numbers in numbered lists appear right-aligned,
like this:
8.
9.
10.
instead
of left-aligned, like this:
8.
9.
10.
You
can set up your lists so that numbers appear right-aligned by making two minor
adjustments to the procedures described above. However, the right-alignment works
only in Word. You will not see right-aligned numbers in WinHelp because
WinHelp does not support right-aligned tab stops. If you are creating a Word document,
you can use these alternate instructions; if you are creating WinHelp, though,
we suggest you ignore them.
N O T E
It is possible to get right-aligned numbers in WinHelp, but only by putting all
procedure steps into a table; we do not recommend this.
Adjustment #1
When
you define the list style (e.g., "Topic Text Step") in your ROBOHELP.DOT
template, set up the paragraph style with two tab stops instead of just one. The
first tab stop should be right-aligned; this is where the period after the numbers
will appear. The second tab stop should be left-aligned at the same position as
the hanging indent.
For example, if you set the hanging indent for the paragraph
to 0.28", you could set a right tab stop at 0.24" (just a bit to the
left of the hanging indent) and a left tab stop at 0.28" (the same position
as the hanging indent). The ruler might look something like this:

Be sure to save these two tab stops as part of the style you use for procedure
steps (e.g., "Topic Text Step").
Adjustment #2
Here's
the modified procedure for creating numbered list items when you want your numbers
to appear right-aligned:
1. In your Help document, press Enter to start
a new paragraph.
2. Apply the Topic Text Step style to the new paragraph.
3.
Press the Tab key.
4. Type 1]
5.
Press the Tab key.
6. Type the text of the first item in the numbered list.
7.
For each subsequent item in the numbered list:
a. Press Enter
to start a new paragraph.
b. Press the Tab key.
c. Type n]
d.
Press the Tab key.
e. Type the next item in the numbered list.
Copyright
© 1994-2003 David A. Knopf, Inc.
This article reprinted with
permission. David Knopf is the founder of Knopf
Online and a nationally known consultant who specializes in online information
and single source solutions.