How to Identify and Tag Numbered Lists using VBA
How to Identify and Tag Bullet Lists using VBA
Following snippet identifies a Bulleted List and Tags all Bullet List items and the Bulletted List as a whole
Sub Tag_Lists()
Dim oBL As ListFormat
Dim oList As List
Dim oLI
For Each oList In ActiveDocument.Lists
If oList.Range.ListFormat.ListType = WdListType.wdListBullet Then
For Each oLI In oList.ListParagraphs
oLI.Range.InsertBefore "
"
Next oLI
oList.Range.InsertBefore "
- " oList.Range.InsertAfter "
"
End If
Next oList
End Sub
- Login or register to post comments
- Feed: vbadb feed
- Original article
