View Single Post
 
Old 06-28-2016, 06:18 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,161
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

As I said, the Headings should be using outline numbering if you want the numbers to relate to each other. If this was the case, the original code would have ignored the headings numbers.

Failing that, there are two other potential ways to sort the headings from the rest. Try either of the following in place of the If line:

If r.ListFormat.ListType = wdListSimpleNumbering And Left(r.Style,7) <> "Heading" Then

If r.ListFormat.ListType = wdListSimpleNumbering And r.ParagraphFormat.OutlineLevel < 10 Then
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote