using VBA to fix list numbering

W

Will Herrick

Hey everyone,

I am using VBA to generate documents from user-inputted forms. These
documents all have lists in them. Unfortunately, I am forced to
copy-and-paste the document into another Word document (due to a
dictation/transcription program we use which is a sort of shell over
Word).

Most of the time, the numbering doesn't get screwed up. However, some
of these lists are 2 levels deep. THIS causes problems. For example,
if a list looks like this after it has been created with a template:

1. <blah blah blah>
a. <blah blah blah>
b. <blah blah blah>


1. <blah blah blah>
2. <blah blah blah>



After pasting it into the document, it often looks like this:

1. <blah blah blah>
a. <blah blah blah>
b. <blah blah blah>


2. <blah blah blah>
3. <blah blah blah>


So I am forced to fix the numbering on the second list (go into
"Bullets and Numbering", select a numbered list, then change the
settings to 0" alignment and 0.5" indent). This isn't as elegant as
we'd like it to be. We would like to be able to paste and voila, be
done with the document.

So I have found the following page on mvps:
http://word.mvps.org/FAQs/Numbering/WordsNumberingExplained.htm
this has a link to another document on MVPS, which appears to have the
info I need: http://word.mvps.org/FAQs/Numbering/CureListNumbering.htm

but this link doesn't work! (I've emailed the webmaster about it a
couple of weeks ago but it doesn't look like the site gets much
attention anymore)

Can anyone explain what might have been contained in this document, if
it really will help me out? Maybe someone has it archived somewhere?

Thanks!
 
M

Margaret Aldis

Hi Will

You should be able to get away without the VBA list set up provided you set
the styles up following the instructions in:

http://www.shaunakelly.com/word/numbering/OutlineNumbering.html

You'll also need to plan how to restart the numbering on your lists, so see
also

http://www.syntagma.demon.co.uk/FAQs/ListRestartMethods.htm

The problem with the paste is that Word often reapplies numbering as direct
formatting (using goodness knows what criteria, since the numbering rarely
seems to comply with either the source or the target rules). However, with
style-based numbering you can always fix this by resetting to para format.
If you use styles strictly throughout, that means just select all and Ctrl-Q
if done manually. Alternatively you can use the Styles and Formatting pane
(with Keep track of formatting option on) or a small macro to reset or
reapply the list styles only.
 
W

Will Herrick

Hey, thanks a lot, I've gotten it to work and thus have made these
documents even quicker!
 

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