List Property

Microsoft Word Visual Basic

object that represents the first formatted list contained in the specified ListFormat object.

expression.List

expression    Required. An expression that returns a ListFormat object.

Remarks

If the first paragraph in the range for the ListFormat object is not formatted as a list, the List property returns nothing.

Example

This example returns the first list in the selection, and then it applies the first list template (excluding None) on the Numbered tab in the Bullets and Numbering dialog box (Format menu). The selection can only contain one list.

Set mylist = Selection.Range.ListFormat.List
mylist.ApplyListTemplate _
    ListTemplate:=ListGalleries(wdNumberGallery) _
    .ListTemplates(1)