I don't know anything about the MS Word 2000 object model and like i
less the more I see of it, but need a solution to the followin
problem. Any help is appreciated.
I have a document with lists that start correctly with #1, although
see they have "Continue with Previous List" set in Bullets an
Numbering. I need to change this Bullets and Numbering setting t
"Restart Numbering" for the sake of an HTML translator which i
screwing up the numbering. It apparently uses the Bullets and Numberin
setting rather than the ListFormat.ListValue to determine how to numbe
the list elements.
Example (in .doc file):
1. Step 1
2. Step 2
Intervening Paragraphs
1. Step 1.*
2. Step 2.
*Here, Bullets and Numbering shows "Continue with Previous List," eve
though the number value assigned to the list is "1".
What I'm trying to do is go through the doc, find all the list element
with a value of "1" and set "Restart Numbering" on each of them. Th
following finds the the "number 1's," but ApplyList appears to have n
affect. What's wrong?
Sub resetNums()
Dim P As Paragraph
For Each P In ActiveDocument.ListParagraphs
P.Range.Select
If P.Range.ListFormat.ListValue = 1 Then
P.Range.ListFormat.ApplyListTemplate _
P.Range.ListFormat.ListTemplate, _
False
End If
Next P
End Sub
Thanks
Bruce Brown - 05 Mar 2004 16:31 GMT
Gordon,
Why not first make a copy of the document then run this line of code:
ActiveDocument.ConvertNumbersToText
Then feed it to the HTML translator and see if its digestion is improved.
- Bruce
> I don't know anything about the MS Word 2000 object model and like it
> less the more I see of it, but need a solution to the following
[quoted text clipped - 43 lines]
> ------------------------------------------------
> ~~ Message posted from http://www.WordForums.com/
gordon kush - 10 Mar 2004 00:03 GMT
That worked! Thanks Bruce.
It's also far easier than the other solution someone in my grou
suggested -- converting all of the numbered lists to field codes.
I'm still curious as to why applylisttemplate does not seem to work a
advertised in this case, but it was only a means, not the end