ListNum glitch

S

Steve Franks

I've used ListNum to stabilise the outline numbering in a document I'm
revising and suddenly the next number in the list is (3).
Previous items are 4.2.1 and 4.2.2.1 so I expected this to be 4.2.2.2.
There are a number of unnumbered lines between the 'ListNum' lines.
Two of these are captions containing sequence fields
i.e. {SEQ Figure \* ARABIC}
Could this be the cause? Is there a cure?
Thanks
Steve
 
B

Bruce Brown

No, Steve, it's not the SEQ fields; they seem to have no effect
whatsoever on LISTNUM numbering.

The important thing to remember about { LISTNUM }is that, used by
itself with no switches as shown above, it merely reproduces and
increments the last number or bullet that happens to come before it.

However, by adding two switches and the name of the list template for
which it is substituting, LISTNUM can be made to specify the exact
number you want and its number value provided that you are using
outline numbered styles with a named list template.

Let's say, for example, that you're using the built-in Heading styles
to do your legal numbering 1, 1.1, 1.1.1, 1.1.1.1. With your cursor
on any Heading 1 paragraph, edit the style and go to Format > Modify >
Numbering > Customize. If necessary, click More to see the bottom of
the Customize Outline Numbered List dialog. If the box at the bottom
('ListNum field list name') is blank, type in a name like
"MyLegalNumbering" and click OK, OK.

Now, to get the level 4 number you need, add a LISTNUM field like
this:

( LISTNUM MyLegalNumbering \L 4 }

By specifying the list template name and the level you want, you've
told LISTNUM to give you the next sequence in the level 4 numbering
belonging to the list template named MyLegalNumbering. No matter what
other numbering comes between the two LISTNUM fields, you'll get
4.2.2.2 instead of (3).

P.S. You can also specify the start value of the number like this:

( LISTNUM MyLegalNumbering \L 4 \ S 1 }

Very handy for re-starts. - Bruce
 
S

Steve Franks

Sorry, I didn't give you all the facts.
I have used a named list and the level switch you
mentioned.
Something between two consecutive ListNum fields
(cut/pasted so they are identical), has messed up the
sequence.
Thanks for your response,
Regards
Steve
 
W

Word Heretic

G'day "Steve Franks" <[email protected]>,

I have no idea of thread context - but you HAVE tried a Maggie yeah?


(cuttenpaste all bar last para mark to a new doc for each section)


Steve Franks said:
Sorry, I didn't give you all the facts.
I have used a named list and the level switch you
mentioned.
Something between two consecutive ListNum fields
(cut/pasted so they are identical), has messed up the
sequence.
Thanks for your response,
Regards
Steve

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If my answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.
 
B

Bruce Brown

Steve -

Yours is a most perplexing problem. I can't imagine what's gone wrong;
under normal circumstances LISTNUM is the nth degree in reliability.

You might try selecting paragraphs between the LISTNUM fields, a
screenful at a time, and running this macro. It skips paragraphs with
no numbering, but stops at each numbered paragraph and gives the
number value, number style, level, and list type. The list types are:

0 = no numbering
1 = LISTNUM field
2 = bulleted
3 = simple, single-level numbering
4 = outline numbering
5 = mixed


Sub TestEachPara ()
Dim P As Paragraph, Ans As Byte, R As Range
Set R = Selection.Range
Selection.Collapse wdCollapseStart
For Each P In R.Paragraphs
If P.Range.ListFormat.ListType > 0 Then
P.Range.Select
Ans = MsgBox("Level " & P.Range.ListFormat.ListLevelNumber &
", list type = " & P.Range.ListFormat.ListType & _
". Continue?", vbYesNo, _
"Number Value = " & P.Range.ListFormat.ListValue & ",
Number Style = " & P.Range.ListFormat.ListString)
P.Range.Collapse wdCollapseEnd
If Ans <> 6 Then Exit Sub
End If
Next
End Sub

Hopefully you'll find the offending paragraph and remove the cause of
the glitch.

- Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top