Changing start/numbering value on Range.ListFormat.ApplyNumberDefa

D

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.
 
S

StevenM

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top