ListLevel.NumberFormat property (Word)
Returns or sets the number format for the specified list level. Read/write String.
Syntax
expression.NumberFormat
expression An expression that returns a 'ListLevel' object.
Remarks
The percent sign (%) followed by any number from 1 through 9 represents the number style from the respective list level. For example, if you wanted the format for the first level to be "Article I," "Article II," and so on, the string for the NumberFormat property would be "Article %1" and the NumberStyle property would be set to wdListNumberStyleUpperCaseRoman.
If the NumberStyle property is set to wdListNumberStyleBullet, the string for the NumberFormat property can only contain one character.
Example
This example creates a list template that indents each level and formats the level with an Arabic numeral and a period. The new list template is then applied to the selection.
Set LT = ActiveDocument.ListTemplates.Add(OutlineNumbered:=True)
For x = 1 To 9
With LT.ListLevels(x)
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = InchesToPoints(0.25 * (x - 1))
.TextPosition = InchesToPoints(0.25 * x)
.NumberFormat = "%" & x & "."
End With
Next x
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=LT
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.