Share via


Range.ListFormat Property

Word Developer Reference

Returns a ListFormat object that represents all the list formatting characteristics of a range. Read-only.

Syntax

expression.ListFormat

expression   A variable that represents a Range object.

Example

This example sets the variable myDoc to a range that includes paragraphs three through six of the active document. The example then either applies the default outline-numbered list format to the range or removes it, depending on whether or not the format was already applied to the range.

Visual Basic for Applications
  Set myDoc = ActiveDocument
Set myRange = _
    myDoc.Range(Start:= myDoc.Paragraphs(3).Range.Start, _
    End:=myDoc.Paragraphs(6).Range.End)
myRange.ListFormat.ApplyOutlineNumberDefault

This example applies the second list template on the Numbered tab in the Bullets and Numbering dialog box to all the paragraphs in the selection.

Visual Basic for Applications
  Selection.Range.ListFormat.ApplyListTemplate _
    ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(2)

See Also