You can download a sample template in Word 6/95 file format (29 KB). There is an example in it for items marked with an *asterisk. Code for automating numbering using Word fields can be found in the MOD article "Word Fields, Part II: Numbering Conundrums".

*Create a reverse numbering sequence in Word

Word has no provision for numbering in reverse order. But you can set up a semiautomatic numbering sequence using a combination of formula, SET and SEQ fields .
Example: { SET HighNr 11 }{ = HighNr - { SEQ RevNrList } }
{ = HighNr - { SEQ RevNrList } }
{ = HighNr - { SEQ RevNrList } }
Display:10
9
8

Generate a number sequence like Excel uses to number columns

Traditional outline numbering using alphabetic characters proceeds A...Z, AA, BB, CC. But most people these days are so accustomed to the sequence used for Excel columns (A...Z, AA, AB, AC) that they prefer this in their documents. It is even a requirement for legal documents in some counties / states.

No current version of Word supports the Excel-type numbering. But it can be achieved using SET and IF fields:
{ Quote { Set ABC { = { ABC } + 1 } }{ SET ABC2 { IF { ABC } > 26 "{ IF { = MOD({ ABC }, 26) } = 1 "{ = { ABC2 } + 1 }" "{ ABC2 }" }" "{ ABC2 }" } }{ SET ABC1 { IF ABC1 < 26 "{ = { ABC1 } + 1 }" "1" } }{ If { ABC } < 27 "{ ABC1 \* ALPHABETIC }" "{ ABC2 \* ALPHABETIC }{ ABC1 \* ALPHABETIC }" } }

More information on how to use fields.


Use Relative Cell References in Word table formulas

Cell references in Word formulas are always absolute: when you copy them they paste in literally and you have to adjust them manually. Here, again, a combination of formula, SET and SEQ fields offer a solution.

In Word 6/95, this works:
ITEM 1ITEM 2ITEM 3Standard FormulaRESULTField set to generate relative cell reference
324{ = A1 * B1 - C1 }2{ Quote { Set CellNr1 "a{ SEQ CellNr }" }{ Set CellNr2 "b{ SEQ CellNr \c }" }{ Set CellNr3 "c{ SEQ CellNr \c }" }{ = { Ref CellNr1 }*{ Ref CellNr2 }-{ Ref CellNr3 } } }
624{ = A2 * B2 - C2 }8{ Quote { Set CellNr1 "a{ SEQ CellNr }" }{ Set CellNr2 "b{ SEQ CellNr \c }" }{ Set CellNr3 "c{ SEQ CellNr \c }" }{ = { Ref CellNr1 }*{ Ref CellNr2 }-{ Ref CellNr3 } } }

As in so many things, Word97's fields don't behave quite right. When you try to combine something in the SET bookmark with the SEQ field, the SEQ field increments by 2, instead of by 1, so you need this:
ITEM 1ITEM 2ITEM 3Standard FormulaRESULTField set to generate relative cell reference
324{ = A1 * B1 - C1 }2{ Quote { Set CellNr1 "a{ = { SEQ CellNr }/2}" }{ Set CellNr2 "b{ = { SEQ CellNr \c }/2}" }{ Set CellNr3 "c{ = { SEQ CellNr \c }/2}" }{ = { Ref CellNr1 }*{ Ref CellNr2 }-{ Ref CellNr3 } } }

The QUOTE field is not necessary, but it helps to keep everything together. The SET fields create bookmarks referenced in the formula. The SEQ fields generate the row numbers. The first one will update as it is copied down the table; the second and third are locked to the first by the \c switch.


*Right-align Autonumbers in a list

By default, the numbers are aligned to the left. If you click "Modify" in Format/Bullets and Numbering you can change this. The "Alignment" list with Left/Center/Right is easy to find. But you may be disappointed not to see an immediate effect when you go back to your document. This may happen if the number doesn't find enough elbow room between the indent setting and the text. Increase the "Distance from Indent to text" setting and you should see the numbers align to the right.

*Display millions when using CardText or DollarText number formats

There are special formatting switches that allow you to display a number as text, either with or without "dollars". (For more information on the number formatting switches, look under Switches; field switches; number formats in Word's Help Index.) But the program is limited to displaying the information for numbers less than one million. In order to display amounts in the millions as text, you need to use a combination of nested fields:
Example: { QUOTE { = SET n 1999999 }{ IF n < 1000000 "{ = n \*cardtext }" "{ = int(n/1000000) \* cardtext } million { SET r { = MOD(n, 1000000) } }{ IF r = 0 "" "{ = r \* cardtext }" }" } \* caps \* CharFormat }
Display:one million nine hundred ninety-nine thousand nine hundred ninety-nine
The QUOTE field keeps everything together. The number you want to work with is bookmarked in the SET field. Then you test whether the number is greater than one million. If it is, divide it by one million, then get the integer of this result for the words in millions. Next, determine the remainder and get the text for it.
I can't take credit for this solution. It is the result of the combined efforts of numerous regulars in GO MSWORD on CompuServe. Thanks for you input, friends, as always :-)

Continuous Page Numbering across separate files

As many of us have experienced, the Master Document feature in Word is simply not stable enough to rely on for working with large documents. If you must manage a large document as separate files, there are some tricks you can use. For example, using a couple of fields, you can create consecutive page numbering across multiple files:

  1. At the end of the first document insert a PAGE field; select it.
  2. Format the field as "hidden".
  3. Place the field in a bookmark (Word 6/95: Edit/Bookmark; Word97 and later: Insert/Bookmark).
  4. Save this file; open the next file.
  5. In the header or footer, where the page number should appear, insert the following set of fields:
    { = { PAGE} + { INCLUDETEXT "C:\\My Book\\Chap1.doc" Chap1Pages 
    \* CharFormat \! } }
    Repeat the steps for each document in sequence.

Discussion: The INCLUDETEXT field can reference any document, and any bookmark within a document. Be sure to place the document path in "double-quotes", and to use double-backslashes. The bookmark name follows the path (Chap1Pages, in the above example). The \* CharFormat switch forces the field result to be formatted with the font settings in the target document, rather than bring the formatting with it (otherwise the result would be "hidden"). The \! switch prevents the PAGE field within the bookmark from updating to reflect the context in the target document.

More information on how to use fields.


Word 6/95: Place a table in a numbered list with continuous numbering

If you insert a table (or other object) in numbered text the numbering restarts after the table. There are a number of workarounds:
  1. Use a Heading style to generate the numbering. You can use a style near the end of the list, such as Heading 7. Simply format the style to look like the text in the body of the document. This method works well in all situations where you are not already using all Heading levels to outline your document.
  2. *Use SEQ fields to create the numbering. This method is very versatile, although it will seem awkward, especially until it is set up. Creating AutoText entries of each numbering level or sequence helps in speeding things up and making work more intuitive. Remember, an AutoText entry can also be assigned to a keyboard shortcut or toolbar button!
  3. Place the table in a frame. The key to this method is to make sure the frame is anchored outside the numbered list. So this method only works well for short lists that cover less than two pages. Format the frame to "Move with text".
  4. *Place the table in a text box. The text box will not interfere with the number flow. The drawback is that text will not flow around a text box. Either press Shift+Enter until the following text is below the text box, or draw an empty frame over the text box. Format the frame to "Move with text", then anchor the text box to the frame and "Lock" the anchor. This way the two will always move together, with the text, as the document is edited.


Return to the top of the numbering FAQ