View Single Post
  #7   Report Post  
Posted to microsoft.public.word.pagelayout
bufossil bufossil is offline
external usenet poster
 
Posts: 54
Default Global command to restart all numbered lists at 1?

Hey Klaus, thanks for the suggestion. I ran the macro you provided, and it
ran without any errors. However, it did not restart a single List Number
list anywhere in the document. Does the macro need to specify that the list
that needs to be restarted is a List Number style?

"Klaus Linke" wrote:

"bufossil" wrote:
I am using Word 2007 on a Windows XP platform.

I have a document that is nearly 300 pages long. It was produced with a
different authoring tool, which publishes output to Word.

When the content arrived in Word 2007, not a single one of the numbered
lists started over at 1. When I check the List Number style, the
properties
say, "Start at: 1", but it never did.

Is there a global command to restart all List Number sets at 1? There is
at
least one Heading 2 and one Heading 3 between each set of numbered lists.

Thank you!



Hi Tim,

Just to make a bit of sense of Word's strange concept of lists:
No matter whether you apply numbering "manually" with the numbering button,
or whether you apply it using a style (such as "List Number"), Word
considers the whole document one long list.
If you have multiple lists (or what you anbd I consider "lists"), to Word
it's one large list with multiple restarts.

"Start at: 1" refers to the whole "Word list".
For what you (and I) consider a list, you have to either follow Stefan's
advice, or apply REstarts (say from the dialog, or right-click in the
paragraph and choose the Restart item in the context menu).

You could also write a macro to apply a restart after each Heading.
I'm not guaranteeing it'll work, but below is an attempt.
If you're not used to use macros, see
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

Regards,
Klaus


Sub RestartListsAfterHeadings()
Dim myPara As Paragraph
Dim boolRestart As Boolean
boolRestart = False
For Each myPara In ActiveDocument.Paragraphs
If myPara.Format.OutlineLevel 4 Then
' Restart after a heading (= outline) level 1-3 is found:
boolRestart = True
End If
' Is the paragraph a list paragraph?
If myPara.Range.ListParagraphs.Count 0 Then
' Para is list para and comes after Heading 1-3?
If boolRestart = True Then
' - apply restart...
With myPara.Range.ListFormat
.ApplyListTemplate .ListTemplate, _
ContinuePreviousList:=False, _
ApplyTo:=wdListApplyToThisPointForward
End With
' ...and reset boolRestart to FALSE so that the other
' list items up to the next heading are ignored:
boolRestart = False
End If
End If
Next myPara
End Sub




.