Class ListLevel (Word VBA)

The class ListLevel represents a single list level, either the only level for a bulleted or numbered list or one of the nine levels of an outline numbered list. The ListLevel object is a member of the ListLevels collection.

Set

To use a ListLevel class variable it first needs to be instantiated, for example

Dim lll as ListLevel
Set lll = ActiveDocument.ListTemplates(1).ListLevels(Index:=1)

The following procedures can be used to set variables of type ListLevel: ListLevels.Item and ListTemplate.ListLevels

For Each

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

Dim lev As ListLevel
r = 0 
For Each lev In ListGalleries(wdOutlineNumberGallery) _ 
 .ListTemplates(6).ListLevels 
 lev.Alignment = wdListLevelAlignLeft 
 lev.NumberPosition = r 
 lev.TextPosition = r 
 lev.TrailingCharacter = wdTrailingSpace 
 r = r + 18 
Next lev

Properties

Alignment returns or sets a WdListLevelAlignment constant that represents the alignment for the list level of the list template.

ActiveDocument.ListTemplates(1).ListLevels(1).Alignment = wdListLevelAlignCenter

Font returns or sets a Font object that represents the character formatting of the specified object.

ActiveDocument.ListTemplates(1).ListLevels(1).Font =

Index returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = ActiveDocument.ListTemplates(1).ListLevels(1).Index

LinkedStyle returns or sets the name of the style that's linked to the specified ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).LinkedStyle =

NumberFormat returns or sets the number format for the specified list level.

ActiveDocument.ListTemplates(1).ListLevels(1).NumberFormat =

NumberPosition returns or sets the position (in points) of the number or bullet for the specified ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).NumberPosition =

NumberStyle returns or sets the number style for the ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).NumberStyle = wdListNumberStyleAiueo

Parent returns an object that represents the parent object of the specified ListLevel object.

Dim objParent As Object
Set objParent = ActiveDocument.ListTemplates(1).ListLevels(1).Parent

PictureBullet returns an InlineShape object that represents a picture bullet.

Dim isePictureBullet As InlineShape
Set isePictureBullet = ActiveDocument.ListTemplates(1).ListLevels(1).PictureBullet

ResetOnHigher sets or returns the list level that must appear before the specified list level restarts numbering at 1.

ActiveDocument.ListTemplates(1).ListLevels(1).ResetOnHigher =

StartAt returns or sets the starting number for the specified ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).StartAt =

TabPosition returns or sets the tab position for the specified ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).TabPosition =

TextPosition returns or sets the position (in points) for the second line of wrapping text for the specified ListLevel object.

ActiveDocument.ListTemplates(1).ListLevels(1).TextPosition =

TrailingCharacter returns or sets the character inserted after the number for the specified list level.

ActiveDocument.ListTemplates(1).ListLevels(1).TrailingCharacter = wdTrailingNone

ListLevels.Count returns a Long that represents the number of list levels in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.ListTemplates(1).ListLevels.Count

ListLevels.Parent returns an object that represents the parent object of the specified ListLevels object.

Dim objParent As Object
Set objParent = ActiveDocument.ListTemplates(1).ListLevels.Parent