I have the following code that works great for inserting a list of bullet points. (Inserting strings and making them bullets.)
My only issue and for the life of me cant figure it out is, the last bullet, just the bullet not the text is at 12pt, when it should be 10pt. No matter how I try to insert or format I cant get the bullet point to be 10pt.
I have tried InsertBefore, I end up with extra bullet point. I have tried changing when/where the formatting happens, no luck. Any ideas?
![Name: Bullet.png
Views: 60
Size: 22.3 KB]()
My only issue and for the life of me cant figure it out is, the last bullet, just the bullet not the text is at 12pt, when it should be 10pt. No matter how I try to insert or format I cant get the bullet point to be 10pt.
I have tried InsertBefore, I end up with extra bullet point. I have tried changing when/where the formatting happens, no luck. Any ideas?
Code:
Private Sub CreateBullets(ByVal reportInfo As ReportInformation)
Try
Dim bulletList As String() = reportInfo.BulletPoints.ToArray()
wrdBulletRange = wrdDocument.Bookmarks("StartBullets").Range
wrdBulletRange.Select()
wrdBulletRange.ListFormat.ApplyBulletDefault()
For i As Integer = 0 To bulletList.Length - 1
Dim bulletItem As String = bulletList(i)
If i < bulletList.Length - 1 Then bulletItem &= vbLf
wrdBulletRange.InsertAfter(bulletItem)
Next
wrdBulletRange.Font.Name = "Arial"
wrdBulletRange.Font.Size = 10
Catch ex As Exception
MessageServices.DisplayError("Error", ex)
End Try
End Sub