I was able to replicate by:
- Adding a bulleted list
- In the middle of the list, turning off bullets on one of the items.
- Typing some text on the now non-bulleted line.
When I do so, the corresponding List
entry encompasses the range including the non-bulleted line in the middle.
I think the most realistic answer to your question is to save your document as a plain text file, open that, and re-apply the bullets where you want them. I am not finding anything online that talks about splitting an existing List
.
That said, as far as I can tell, a non-bulleted line within the range of a List
has Range.ListFormat.ListTemplate
equal to Nothing
, unlike the bulleted lines. So one option would be to iterate over your List
record and store separate ranges, breaking based on ListTemplate
. For example, the following function selects the lines in Lists(1)
up to the first non-bulleted line (quick hack; YMMV):
Public Sub SelectList1()
Dim r As Range
Set r = ActiveDocument.Lists(1).Range
Dim p As Paragraph, foundit As Boolean
foundit = False
For Each p In r.Paragraphs
If p.Range.ListFormat.ListTemplate Is Nothing Then
foundit = True
Exit For
End If
Next p
If foundit Then
r.End = p.Range.Start
End If
r.Select
End Sub
For example, with this list created as described above:
* foo
* bar
bat
* baz
Lists(1).Range
includes foo
through baz
, including the intervening bar
. Running SelectList1
(above) selects the foo
and bar
lines, but leaves bat
and baz
unselected.