Applying Number formating AROUND text

B

blogan6

I'm writing a macro to change the font/style/alignment of outline
numbered lists. I think the best way to explain my problem is to show
an example.

Right now the lists look like this.

1. Level 1 header

Body text on level 1

a) Level 2 header

Body text on level 2

When I apply my listTemplate, the body text paragraphs turn into
numbers too. Like this ...

1. Level 1 header

2. Body text on level 1

a) Level 2 header

b) Body text on level 2

The only way I've been able to get around this was to go through
listParagraph by listParagraph and apply the approprate style to each
outline level. But this seems to turn my document from one with 5
separate lists to one with 1 big list.

Anyone know to update/keep the EXISTING numbering and not add anymore?

Thanks!
 
C

Chuck

Your "body text" paragraphs need to be in a separate, non-numbered style:

1. Level 1 numbered style

Body 1 indented non-numbered style

2. Level 1 numbered style

Body 1 indented non-numbered style:

(a) Level 2 numbered style

Body 2 indented non-numbered style

(b) Level 2 numbered style

Body 1 indented non-numbered style

and so forth. Non-numbered styles between numbered styles don't affect the
numbering sequence. It's helpful to assign hotkeys to the different styles.
 
J

Jonathan West

Hi blogan,

You are running into the common problem known as spaghetti numbering. is is
a design flaw in Word.

For a deep & detailed explanation of the problem, go here

Word's numbering explained
http://www.word.mvps.org/FAQs/Numbering/WordsNumberingExplained.htm

For some suggestions as to how to get your document design sorted so that
the problem goes away, go here

Methods for restarting list numbering
http://www.word.mvps.org/FAQs/Numbering/ListRestartMethods.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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