Class ListGallery (Word VBA)

The class ListGallery represents a single gallery of list formats. The ListGallery object is a member of the ListGalleries collection. To use a ListGallery class variable it first needs to be instantiated, for example


Dim lgy as ListGallery
Set lgy = ListGalleries(Index:=1)

For Each

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


Dim lgy As ListGallery
For Each lgy In ListGalleries
	
Next lgy

ListTemplates

Returns a ListTemplates collection that represents all the list formats for the specified list gallery.

For information about returning a single member of a collection, see Returning an object from a collection. The ListTemplates property is a member of the Document, ListGallery, and Template objects.


Set mytemp = ListGalleries(wdOutlineNumberGallery).ListTemplates(1) 
For each lev in mytemp.ListLevels 
 lev.NumberStyle = wdListNumberStyleLowercaseLetter 
Next lev 
ActiveDocument.Lists(2).ApplyListTemplate ListTemplate:=mytemp

Modified

True if the specified list template is not the built-in list template for that position in the list gallery.

Use the Reset method to set a list template in a list gallery back to the built-in list template.

Modified (Index)

Reset

Resets the list template specified by Index for the specified list gallery to the built-in list template format.

Reset (Index)

Index: The template to reset.


ListGalleries(wdNumberGallery).Reset(4) 
Selection.Range.ListFormat.ApplyListTemplate _ 
 ListTemplate:=ListGalleries(2).ListTemplates(4)