ListFormat.ApplyListTemplateWithLevel (Word)

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

ApplyListTemplateWithLevel (ListTemplate, ContinuePreviousList, ApplyTo, DefaultListBehavior, ApplyLevel)


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

Arguments

The following argument is required

ListTemplate (ListTemplate) - The list template to be applied.

Optional arguments

The following arguments are optional

ContinuePreviousList (Boolean) - True to continue the numbering from the previous list; False to start a new list.

ApplyTo (WdListApplyTo) - One of the WdListApplyTo constants that specifies the portion of the list that the list template will be applied to.

Possible return values are wdListApplyToSelection - Selection, wdListApplyToThisPointForward - From cursor insertion point to end of list, wdListApplyToWholeList - Entire list.

DefaultListBehavior (WdDefaultListBehavior) - 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.

Possible return values are wdWord10ListBehavior - Use formatting compatible with Microsoft Word 2002, wdWord8ListBehavior - Use formatting compatible with Microsoft Word 97, wdWord9ListBehavior - Use Web-oriented formatting as introduced in Microsoft Word 2000.

ApplyLevel (Long) - The level to which the list template is to be applied.