Discussion:
Changing start/numbering value on Range.ListFormat.ApplyNumberDefa
(too old to reply)
dyowee
2008-07-18 15:34:01 UTC
Permalink
Good day!
I'm trying to create bulleted/numbered lists in my document
programmatically, but I'm can't find any samples on how I can change the
start value for numbered list. The default start value is 1. What if I want
to change the start value to 2? Also what do I need to do if I want to
support lettered list (using letters instead of numbers)?

Thank you very much in advance for any help.
unknown
2008-07-18 16:39:03 UTC
Permalink
To: Dyowee,

It depends on what type of numbered list you want. But I recorded a macro,
then cutout a chunk of what I deemed to be unnecessary lines, and then test
it.

I also changed .StartAt = 1 to read: .StartAt = 2

'
' Select a list and the run macro.
'
Sub NumberSelection()
With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = PicasToPoints(1.5)
.Alignment = wdListLevelAlignLeft
.TextPosition = PicasToPoints(3)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 2
End With
Selection.Range.ListFormat.ApplyListTemplateWithLevel _
ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(1), _
ContinuePreviousList:=False, _
ApplyTo:=wdListApplyToWholeList, _
DefaultListBehavior:=wdWord10ListBehavior
End Sub

It is not much, but it might get you started.

Steven Craig Miller
Post by dyowee
Good day!
I'm trying to create bulleted/numbered lists in my document
programmatically, but I'm can't find any samples on how I can change the
start value for numbered list. The default start value is 1. What if I want
to change the start value to 2? Also what do I need to do if I want to
support lettered list (using letters instead of numbers)?
Thank you very much in advance for any help.
Loading...