List.ApplyListTemplateWithLevel method (Word)

Applies a set of list-formatting characteristics, optionally for a specified level.


expression. ApplyListTemplateWithLevel( _ListTemplate_ , _ContinuePreviousList_ , _DefaultListBehavior_ , _ApplyLevel_ )

expression A variable that represents a 'List' object.


Name Required/Optional Data type Description
ListTemplate Required ListTemplate The list template to be applied.
ContinuePreviousList Optional Variant True to continue the numbering from the previous list; False to start a new list.
DefaultListBehavior Optional Variant Sets a value that specifies whether Microsoft Word uses new Web-oriented formatting for better list display. Can be either of the following WdDefaultListBehavior constants: wdWord8ListBehavior (use formatting compatible with Microsoft Word 97) or wdWord9ListBehavior (use Web-oriented formatting). For compatibility reasons, the default constant is wdWord8ListBehavior, but in new procedures you should use wdWord9ListBehavior to take advantage of improved Web-oriented formatting for indenting and multiple-level lists.
ApplyLevel Optional Variant The level to which the list template is to be applied.


The following example sets the variable myRange to a range in the active document, and then it verifies whether the range has list formatting. If no list formatting has been applied, the fourth outline-numbered list template is applied to the range.

Set myDoc = ActiveDocument 
Set myRange = myDoc.Range( _ 
 Start:= myDoc.Paragraphs(3).Range.Start, _ 
If myRange.ListFormat.ListType = wdListNoNumbering Then 
 myRange.ListFormat.ApplyListTemplate _ 
 ListTemplate:=ListGalleries(wdOutlineNumberGallery) _ 
End If

See also

List Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.