
Change manual section numbering to auto numbering
Tena koe, Robert,
Are all the "section headings" typed in one specific style? If they are,
then you could either link that specific style to the heading numbering
scheme (rather than Heading 1), or perhaps it would be better to do a Find &
Replace, searching for all instances of the Section Heading style and
replacing with a Heading 1 style.
Using the UI (rather than VBA for the moment), open the Find & Replace
dialog (CTRL-H). Click on the "More" button. In the "Find what" box, type
"^p" without the quotes. This represents a carriage-return character--the
"end of paragraph" marker. With the cursor still in the "Find what" box,
click the "Format" button. You can now specify a particular format to
search for. Chose the "style" option, and the choose the specific style that
is currently being used for your "Section Headings".
Now go to the "Replace with" box. Type in "^p"--you want to replace the
carriage returns, not delete them!--and click on the Format button again.
This time you are specifying the format of the replacement text, so you'd go
ahead and choose the Heading 1 style.
You are now ready to do the replacement. You can either replace then one by
one, or replace them all.
Now--all the above is only going to work if the "section headings" are in a
specific style, and if that specific style is only used for "section
headings". If, on the other hand, you can identify the "section headings" by
the preceding number (2.1, 2.1.1, 2.1.1.1, etc) then there probably *is* a
way to do this with a regexp... but I can't think of it right now...
In my opinion, though, I find it much easier to go through the document
manually applying the correct heading style myself. Why? Well, if someone
has not used a consistent style formatting for headings and numbering, you
often need to have some intelligence to decide what is and what isn't a
heading--and writing some VBA to do this might just get too complicated--a
bit too close to rocket science for my liking!
Applying heading styles using the shortcut keys (ALT+CTRL 1 for heading 1,
ALT+CTRL 2 for heading 2...) is pretty efficient.
Well, hope that helps.
Quote:
>Sorry, I forgot to mention, I'm using Word 98 for Macintosh, version 8.0.
>--
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Rocket Scientist Extraordinaire :)
>Flight Ops. Team - SOlar Heliospheric Observatory (SOHO)