Autonumbering with RoboHelp and Microsoft Word
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
- Create a new Word document based on the NORMAL.DOT template.
- In Word, choose Tools > Options.
- On the View tab of the Options dialog box, select Field Codes.
- Click OK.
- Choose Insert > Field.
- In the box at the bottom of the Field dialog box, replace the equal sign with the following text:
- Click OK.
- Press Enter to start a new paragraph.
- Choose Insert > Field.
- In the box at the bottom of the Field dialog box, replace the equal sign with the following text:
- Click OK.
- 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.
- Choose Tools > AutoCorrect.
- In the Replace box, type:
- Click OK.
- 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.
- Choose Tools > AutoCorrect.
- In the Replace box, type:
- Click OK.
- 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.)
SEQ Step \r 1
SEQ Step \n
1]
n]
NOTE 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
- Open your Help project in RoboHelp.
- In Word, choose Format > Style.
- In the Style dialog box, click the New button.
- Enter a Name for the style you'll use for numbered list items (we call it “Topic Text Step”).
- Click the Save As RTF
toolbar button on the RoboHelp toolbar in Word. Click Yes to save changes to the document template, as well.
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:
NOTE (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.
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
To transfer style definitions manually
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
- In your Help document, press Enter to start a new paragraph.
- Apply the Topic Text Step style to the new paragraph.
- Type 1]
- Press the Tab key, and then type the text of the first item in the numbered list.
- For each subsequent 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.
NOTE 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:
- In your Help document, press Enter to start a new paragraph.
- Apply the Topic Text Step style to the new paragraph.
- Press the Tab key.
- Type 1]
- Press the Tab key.
- Type the text of the first item in the numbered list.
- For each subsequent item in the numbered list: