override bullet's setting

W

William

hello,

in word xp, how can i override bullet's Indent, Text's Tab space, and Text's
Ident settings under Format, Bullets and Numbering via vba?

thank you,

will
--
 
H

Helmut Weber

Hi Will,

easily done by recording defining a style.

The somewhat simplified result of recording, cleaning the code
of unnecessary stuff and distinguishing between listtemplate 1 and
listtemplate 2 of the ListGalleries(wdNumberGallery):

Dim i As Integer
' set properties of
' ListGalleries(wdNumberGallery).ListTemplates(i).ListLevels(1)
For i = 1 To 2
With ListGalleries(wdNumberGallery).ListTemplates(i).ListLevels(1)
.NumberFormat = "%1."
.NumberPosition = CentimetersToPoints(1)
.Alignment = wdListLevelAlignRight
.TextPosition = CentimetersToPoints(2)
.TabPosition = CentimetersToPoints(2)
.ResetOnHigher = 0
.StartAt = 1
With .Font
If i = 2 Then
.Name = "Arial Black"
Else
.Name = "Arial"
End If
End With
End With
Next
' Apply style 2 to the selection
Selection.Range.ListFormat.ApplyListTemplate _
ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(2), _
ContinuePreviousList:=True, _
ApplyTo:=wdListApplyToWholeList
End Sub

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

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