G
Greg Maxey
I have a document with lots of nested bulleted lists. These lists are
created using List Bullet, List Bullet 2, etc.
I am trying to automate some formatting such that the space before the first
bullet and space after the last bullet is greater than the space between two
adjacent bullets. I can do that with code as follows:
Sub Test()
Dim oPar As Word.Paragraph
For Each oPar In ActiveDocument.Range.Paragraphs
If oPar.Style = "List Bullet 2" Then
If oPar.Previous.Style <> "List Bullet 2" Then oPar.SpaceBefore = 9
If oPar.Next.Style <> "List Bullet 2" Then
oPar.SpaceAfter = 9
Else
oPar.SpaceAfter = 3
End If
End If
Next oPar
End Sub
Is there some way to do this with Style formatting? I see in the
Format>Paragraph>Indents Lines and Spacing Dialog an option to "Don't add
space between paragraphs of the same sytle" but I do want to add a little
space just not as much space as before and after the bullet group.
Is there a better way?
created using List Bullet, List Bullet 2, etc.
I am trying to automate some formatting such that the space before the first
bullet and space after the last bullet is greater than the space between two
adjacent bullets. I can do that with code as follows:
Sub Test()
Dim oPar As Word.Paragraph
For Each oPar In ActiveDocument.Range.Paragraphs
If oPar.Style = "List Bullet 2" Then
If oPar.Previous.Style <> "List Bullet 2" Then oPar.SpaceBefore = 9
If oPar.Next.Style <> "List Bullet 2" Then
oPar.SpaceAfter = 9
Else
oPar.SpaceAfter = 3
End If
End If
Next oPar
End Sub
Is there some way to do this with Style formatting? I see in the
Format>Paragraph>Indents Lines and Spacing Dialog an option to "Don't add
space between paragraphs of the same sytle" but I do want to add a little
space just not as much space as before and after the bullet group.
Is there a better way?