Hi Dunston
The basic steps would be:
1. Setup
a. Set up an appropriate style for your numbered text.
b. Create a listtemplate (eg set oMyNewListTemplate = ActiveDocument.ListTemplates.Add)
c. Link the appropriate style to each level in the list template. This is the crucial issue. You want something like
oMyNewListTemplate.ListLevels(1).LinkedStyle = ActiveDocument.Styles(wdStyleListNumber)
2. Text
a. Add the text to the document.
b. Apply the appropriate style to the text
How to do this in the user interface is at
http://www.ShaunaKelly.com/word/numbering/OutlineNumbering.html. It may be worth working
through it in the UI before coding it. That page talks about headings, but the principle applies to any numbering scheme.
Information about coding is at
http://www.mvps.org/word/FAQs/Numbering/CureListNumbering.htm
Two hints:
1. If you record any macros to get the feel of the process, Word will record using the ListGalleries. Don't use these for the
reasons explained at
http://www.mvps.org/word/FAQs/Numbering/WordsNumberingExplained.htm
2. If you're writing for a broad audience, use Word's built-in styles and refer to them using Word's constants (like
wdStyleListNumber). You can be sure those styles will exist in any document, and the constants solve problems of running the code on
a non-English version of Word.
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia