Help with styles and/or outline level relating to table of content

T

td

Hi,

I have a problem related to how to stop certain entries in a document from
ending up in my table of contents.

I work for a government agency, and we often receive many comments filed on
certain proposed policies. We have made a really useful little program which
allows us to go through those filings and "mark" the text in them as
belonging to a specific topic. When we're done, we run another program which
goes through all of the filings, "collects" entries it sees as being marked
for specific topics and creates separate "topic documents." Those topic
documents begin with a table of contents which lists the party names of the
commenters for that topic. In the body of the topic document, each entry has
a heading (Heading 1 style) that is the party name, and then the pasted text
from that party's filing that relates to that topic.

Here's my problem... Some of these parties already use certain styles and
formatting in their submitted documents. Some of them already use Heading 1.
Some of them don't use Heading 1, but their custom styles end up in my table
of contents (which is set to only include level 1 text) anyway.

Question: I'd like to make a macro which somehow "lowers" the level of the
text in the submitted documents, but without actually changing the physical
format. In other words, I don't want to change how the documents look, just
whether their text interferes with my table of contents. There are so many
different settings though, and I'm not sure which are relevant. And I just
generally get confused with Word's styles and formatting. It seems that if I
manually reduce the heading level (if they even used a heading level) or the
outline level, it changes the formatting. What, if anything, can I do?

So far I've been just manually setting everything to body text, but this
really screws up their formatting, which sometimes can make it difficult to
tell how their original document was organized with headings and such.

Thanks,
Tom
 
D

Daiya Mitchell

I'd approach the problem from a different end. Instead of changing
their formatting, change your TOC so that it only uses your custom
styles, which you can apply as you go through and mark the document.

See here:
http://sbarnhill.mvps.org/wordfaqs/TOCTips.htm

Probably "Use the TOC Options" is the information most directly
applicable, under "Controlling what goes into the TOC"
 
T

td

Thanks for the suggestion, but because of a detail that I inadvertently left
out, this particular approach you have suggested will not (I don't think)
help my situation. At least not without a creative way to solve another
related problem.

One of the other reasons I use headings is to put my body sections (and,
consequently, table of contents entries, since I create the TOC after I do
the alphabetization) in alphabetical order. I've found an easy way to
alphabetize my body sections, but it requires that I have the party names
"stand out" as the highest outline level. What I do (or have the code do) is
switch to outline view, show only the highest outline level (which, ideally,
is limited to my headings and ONLY my headings), manually select all of the
headings (it does NOT work if you do a "select all" for some reason), go to
Table|Sort, and select paragraph/ascending. It then sorts all of my headings
AND the text that belongs to those headings. It's beautiful and saves me
hours of work. The code runs this process before it creats the table of
contents, so that the body sections AND TOC entries are in alphabetical order.

If I have any other bits of text that "stand out" as high as my headings
(with respect to outline level), then they mess EVERYTHING up. They
basically get chopped up and alphabetized with the rest of the heading level
1 stuff. And let me tell you... people filing documents with us put all
kinds of stuff in heading level 1. It's a problem.

I quite agree that your way seems easier IF I didn't need to alphabetize
also (in fact, at first I thought you had solved my problem, before I
remembered this other stuff), but the bosses will not put up with hundreds of
pages of non-alphabetized stuff, and I don't blame them. That would not be
practical to use.

Any alternative ideas of ways to solve this problem?

If not, then I'd be back to my original question about ways to lower outline
level of the docuemnts when they are filed, without changing the other
physical formatting. Then I can mark them electronically, have my program
chop them up, add headings, alphabetize, and add the TOC.

Thanks,
Tom
 
S

Suzanne S. Barnhill

If there are specific styles being used that have an outline level of 1, you
can modify the outline level in the style. If the outline level doesn't
belong to the style and has been applied as direct formatting, then you can
change it by resetting the paragraph to the default style formatting. Of
course, if both the formatting and the outline level have been applied as
direct formatting (probably to Normal style), then you're up a creek!
 

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