I have a Word 2010 document with a lot of lists that were copied from another document. Unfortunately, when I copied the lists into my document they do not start at 1 anymore as they did in the orginial but are continuing from the previous lists leading up to chaos in my document.
I need my macro to run along all the numbered lists in my document and restarts each list at 1. I tried this with listformat.applylisttemplate but when calling my lists with "For Each li In ActiveDocument.Lists" I could not use the listformat function. See my code snippet below.
Set temp3 = wrdApp.ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)
With temp3
.StartAt = 1
End With
For Each li In ActiveDocument.Lists
li.Range.ListFormat.ApplyListTemplate ListTemplate:=temp3
Next
Obviously I would like something in the form of:
For Each li In ActiveDocument.Lists
li. => restart list count here
Next
Can anyone help? Thanks!
Addition: my current text looks like below and I'm trying to get the macro to restart each list with 1 in Word:
INPUT:
Sometext
3. TextA
4. TextB
5. TextC
6. TextD
Some other text
21. Text q
22. Text w
23. Text e
OUTPUT after macro:
1. TextA
2. TextB
3. TextC
4. TextD
Some other text
1. Text q
2. Text w
3. Text e