Lists Collection Object
Word Developer Reference |
A collection of List objects that represent all the lists in the specified document.
Remarks
Use the Lists property to return the Lists collection. The following example displays the number of items in each list in the active document.
Visual Basic for Applications |
---|
|
Use Lists(Index), where Index is the index number, to return a single List object. The following example applies the first list format (excluding None) on the Numbered tab in the Bullets and Numbering dialog box to the second list in the active document.
Visual Basic for Applications |
---|
|
When you use a For Each loop to enumerate the Lists collection, the lists in a document are returned in reverse order. The following example counts the items for each list in the active document, from the bottom of the document upward.
Visual Basic for Applications |
---|
|
To add a new list to a document, use the ApplyListTemplate method with the ListFormat object for a specified range.
You can manipulate the individual List objects within a document, but for more precise control you should work with the ListFormat object.
Note |
---|
Picture-bulleted lists are not included in the Lists collection. |
See Also