A ListTemplate is a construct saved within a document file. It stores a
numbering 'structure'. ListTemplates are exposed only indirectly in the
user interface, but they are exposed in the Word object model and can
therefore be accessed by VBA and other languages.
Imagine a document with heading numbering set up in the classic way:
In this case, you would set up all 9 heading styles (Heading 1, Heading
2, ... Heading 9) in one numbering structure because (eg) you want
Heading 2 to start re-numbering from 1 after each Heading 1 (to get 1.1
and 2.1), Heading 3 to start re-numbering after each Heading 3 etc.
That structure is a ListTemplate. The ListTemplate stores which styles
go with which of the 9 levels. It stores information about the numbering
(roman, arabic), how to display the numbering (eg "Chapter 1" or "1" or
"(1)"), how far to indent the numbers, and how they re-start. In short,
all the things that are exposed in the Customize Outline Numbered List
A ListTemplate may have one level (akin to the "Bulleted" and "Numbered"
tabs on the Bullets and Numbering dialog box), or exactly 9 levels (akin
to the "Outline Numbered" tab).
We can imagine our document with the text above having exactly one
ListTemplate. It has 9 levels, with a heading style attached to each
level, and it knows how to display the numbering for the headings. I
sometimes think of a ListTemplate as a little wooden box with 9
compartments into each of which we put information about the numbering
required for that level.
A ListTemplate may or may not have a name. You can assign a name when
you're setting up numbering by using the "ListNum field list name" box.
There is some belief that giving a list template a name provides some
So far, so good.
But Word sometimes gets mixed up. It creates extraneous ListTemplates.
It gets confused about which one to use. If you don't talk to it nicely,
it moves styles around from one little wooden box to another. It tries
to put the same style into more than one wooden box. When I copy and
paste from one document to another, it isn't quite sure what to do with
the information in the wooden boxes. And so on.
For example, before Word 2003, every time you even opened the Customize
Outline Numbered List dialog box, Word would create another
ListTemplate. Before Word 2002 (or was it 2000?) Word had a limit of the
number of ListTemplates it could handle in one document, but no way to
'clean out' all the extraneous ones it had created, causing Word to
crash. In some cases, if you click in anything except a paragraph in the
style attached to Level 1 of the ListTemplate, Word either creates a new
ListTemplate or gets confused about which one it is supposed to be
editing. Hence the exhortation to click within a Heading 1 paragraph,
even if you want to change the numbering for (say) Heading 4.
None of this is exposed to the user in the user interface. None of it
has been documented by Microsoft. And only some of it is exposed in the
object model to programmers (eg even in code, you can't delete a
ListTemplate). This makes it just a little difficult to know how to
manage it all<g>.
Everything any of us have learned about n