Add Method (ListTemplates Collection)

Applies To

ListTemplates collection object.

Description

Creates a new list template.

Syntax

expression.Add(OutlineNumbered, Name)

expression Required. An expression that returns a ListTemplates object.

OutlineNumbered Optional Variant. True to apply outline numbering to the new list template.

Name Optional Variant. An optional name used for linking the list template to a LISTNUM field. You cannot use this name to index the list template in the collection.

Remarks

You cannot use the Add method on ListTemplates objects returned from a ListGallery object. You can, however, modify the existing list templates in the galleries.

See Also

ListTemplate object.

Example

This example adds a new, single-level list template to the active document. The example changes the numbering style for the new list template and then applies the list template to the selection.

Set myList = ActiveDocument.ListTemplates.Add(OutlineNumbered:=False)
myList.ListLevels(1).NumberStyle = wdListNumberStyleUpperCaseLetter
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=myList