Autonumbering with RoboHelp and Microsoft Word

 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:

  1. 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.
  2. 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.
  3. 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.
  4. Create numbered lists using the new style and AutoCorrect entries.
  5. 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:
  7. 
    SEQ Step \r 1
    
    
  8. Click OK.
  9. Press Enter to start a new paragraph.
  10. Choose Insert > Field.
  11. In the box at the bottom of the Field dialog box, replace the equal sign with the following text:
  12. 
    SEQ Step \n
    
    
  13. Click OK.
  14. 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.
  15. Choose Tools > AutoCorrect.
  16. In the Replace box, type:
  17. 
    1]
    
    
  18. Click OK.
  19. 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.
  20. Choose Tools > AutoCorrect.
  21. In the Replace box, type:
  22. 
    n]
    
    
  23. Click OK.
  24. 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.)
  25. 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

  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”).
  5. 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:

    Paragraph dialog box

    The ruler might look something like this:

    Word ruler showing hanging indents

    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.

  6. Click the Save As RTF Save As RTF toolbar button 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:
    1. Open the document.
    2. In Word, choose Tools > Templates & Add-Ins.
    3. In the Templates & Add-Ins dialog box, select Automatically update document styles.
    4. Click OK.
    5. Click the Save As RTF Save As RTF toolbar button 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:
    1. Open the document.
    2. In Word, choose Format > Style.
    3. In the Style dialog box, click Organizer.
    4. 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:
    1. Press Enter to start a new paragraph.
    2. Type n]
    3. 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

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:

Word ruler showing hanging indent

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:
    1. Press Enter to start a new paragraph.
    2. Press the Tab key.
    3. Type n]
    4. Press the Tab key.
    5. Type the next item in the numbered list.