ListFormat Object

         Properties         Methods        

Range object
ListFormat object
Multiple objects

Represents the list formatting attributes that can be applied to the paragraphs in a range.

Using the ListFormat Object

Use the ListFormat property to return the ListFormat object for a range. The following example applies the default bulleted list format to the selection.

Selection.Range.ListFormat.ApplyBulletDefault

Applying a List Template

An easy way to apply list formatting is to use the ApplyBulletDefault, ApplyNumberDefault, and ApplyOutlineNumberDefault methods, which correspond, respectively, to the first list format (excluding None) on each tab in the Bullets and Numbering dialog box.

To apply a format other than the default format, use the ApplyListTemplate method, which allows you to specify the list format (list template) you want to apply.

Returning the List or List Template

Use the List or ListTemplate property to return the list or list template from the first paragraph in the specified range.

Remarks

Use the ListFormat property with a Range object to access the list formatting properties and methods available for the specified range. The following example applies the default bullet list format to the second paragraph in the active document.

ActiveDocument.Paragraphs(2).Range.ListFormat.ApplyBulletDefault

However, if there's already a list defined in your document, you can access a List object by using the Lists property. The following example changes the format of the list created in the preceding example to the first number format on the Numbered tab in the Bullets and Numbering dialog box.

ActiveDocument.Lists(1).ApplyListTemplate _
    ListTemplate:=ListGalleries(2).ListTemplates(1)