Class ListTemplate (Word VBA)

The class ListTemplate represents a single list template that includes all the formatting that defines a list. The ListTemplate object is a member of the ListTemplates collection. To use a ListTemplate class variable it first needs to be instantiated, for example


Dim lte as ListTemplate
Set lte = ActiveDocument.ListTemplates(Index:=1)

For Each

Here is an example of processing the ListTemplate items in a collection.


Dim lte As ListTemplate
For Each lte In ActiveDocument.ListTemplates
	
Next lte

Convert

Converts a multiple-level list to a single-level list, or vice versa.

You cannot use the Convert method on a list template that is derived from the ListGalleries collection.

Convert (Level)

Level: The level to use for formatting the new list. When converting a multiple-level list to a single-level list, this argument can be a number from 1 through 9. When converting a single-level list to a multiple-level list, 1 is the only valid value. If this argument is omitted, 1 is the default value.


ActiveDocument.ListTemplates(1).Convert

ListLevels

Returns a ListLevels collection that represents all the levels for the specified ListTemplate.

For information about returning a single member of a collection, see Returning an object from a collection.


Set myListTemp = _ 
 ListGalleries(wdOutlineNumberGallery).ListTemplates(1) 
For Each mylevel In myListTemp.ListLevels 
 mylevel.LinkedStyle = "Heading " & mylevel.index 
Next mylevel

Name

Returns or sets the name of the specified object.


ActiveDocument.ListTemplates(1).Name =

OutlineNumbered

True if the specified ListTemplate object is outline numbered.

Setting this property to False converts the list template to a single-level list that uses the formatting of the first level. You cannot set this property for a ListTemplate object returned from a ListGallery object.


Selection.Range.ListFormat.ListTemplate.OutlineNumbered = False