Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / March 2004

Tip: Looking for answers? Try searching our database.

ApplyListTemplate failure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gordon kush - 04 Mar 2004 21:15 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.