Question

I'm trying to find instances of a bullet list in a document then change the bullet type and bullet size.

I was trying to change the following style code so that it would use a bullet type that is formatted to the size and type of bullet i want but I can't seem to figure out the correct object to call or the correct properties to assign.

I have added a custom bullet type and size to the bullet list it is in position nine(9) of the list, if that helps.

I was tried to change the "list Paragraph" to a bullet type but kept keeping an error.

Sub BulletStyle ()
Dim oBull As Word.Paragraph

For Each oBull In ActiveDocument.Paragraphs
   If oBull.Range.ListFormat.ListType = _
         WdListType.wdListBullet Then
      oBull.Style = "List Paragraph"
   End If
Next
End Sub
Was it helpful?

Solution

Create a Custom Style that is set to the bullet you want to change it to and make sure format is set to "Numbering" in the style definition.

Then simply change the following line of code

oBull.Style = "List Paragraph"

To the name of your custom style:

oBull.Style = "MyCustomStyle"

When you create your Custom Style make sure to set Format as Numbering.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top