View Single Post
 
Old 06-09-2022, 08:52 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

Outline levels are a paragraph setting which Word locks for the built-in "Heading #" styles. You can also assign them to other styles as well. The 'Schedule Level #' styles are going to be custom styles which could have an outline level assigned to them. If you did that before running the macro it would work in the same way.

There are other ways to keep track of the number level of the preceding heading. I just used OutlineLevel because your original sample used the built-in Headings. You could also harvest the value that comes where you have put * in "Schedule Level *"
eg
iLev = CInt(Split(sStyName," ")(2))
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote