TOC entries get wrong page numbers


G

GregW

Well I read the MVP numbering site and thought I was doing this right, but
apparently not.

I have a document that must be numbered by chapter-section-page. It's not my
choice and I can't change it. For numbering I used heading styles 1-3.
Heading 1 is not numbered (I've numbered it as well), heading 2 and 3 are.
Numbering is controlled from the heading 1 style. Page numbers are generated
by using Insert->page number->format and are set to x-y with page numbers
restarting on heading 2. I get the chapter number by using {SEQ
chapter}-{page}.

It all seems to work fine, until I build the TOC. The TOC should look
something like:
Introduction...............................0-0-1
1. Revisions.............................0-1-1
2. List of Effective pages...........0-2-1
3. Contents..............................0-3-1
General.....................................1-0-1
0. Contents..............................1-0-1
1. Purpose...............................1-1-1

Instead it looks like
Introduction...............................0-0-1
1. Revisions.............................0-1-1
2. List of Effective pages...........0-2-1
3. Contents..............................0-3-1
General.....................................1-3-1 <<<<
0. Contents..............................1-0-1
1. Purpose...............................1-1-1

Everything else is correct. The page number in the header on every page is
correct, but the TOC entry is wrong. The heading 1 General is on a page with
1-0-1 as the page number in the header!

Help?
 
Ad

Advertisements

W

Word Angel

Soooo confusing to read.. :) I can probably fix this for you easier
than telling you, and once I see it I'll understand what you need.
Send it to me and I fix it for you for free.
-Angel
www.wordangel.com "Word Processing at Your Fingertips"
(e-mail address removed)
 
G

GregW

Thanks for looking at the document Word Angel. I thought your note about
corrupt section breaks was interesting, so I tried again with default styles.

This is definitely a bug. If I use the default heading style and have
chapters start with heading style 1, it is still wrong. Here is the TOC:

Title I.1
I. Chapter 1 I.1
A. Section 1 I.1
1. Heading 1 I.1
2. Heading 2 I.1
3. Heading 3 I.2
4. Heading 4 I.2
B. Section 2 I.1
1. Heading 1 I.1
2. Heading 2 I.1
3. Heading 3 I.2
4. Heading 4 I.2
5. Test another heading I.1 <<<<<<<<
II. Chapter 2 II.1
A. Section 1 II.1
1. Heading 1 II.1
2. Heading 2 II.1
3. Heading 3 II.2
4. Heading 4 II.2
B. Section 2 II.1
1. Heading 1 II.1
2. Heading 2 II.1
3. Heading 3 II.2
4. Heading 4 II.2

The heading "test another heading" is located on page II.1 just above the
Chapter 2 heading, but word records it as being located on page I.1. It
grabbed the correct page number since they reset on section breaks. The
"chapter" number is from the previous section. The MS word code must
reference the currect section number and not the one that will be assigned to
the page. Was this feature ever tested?? Brutal. I wonder if open office does
it right ...

Now what I really need to know is how to get around it. I want chapters to
reset section numbers and section numbers to reset page numbers. But due to
the bug my TOC will be wrong for any headings on the same page but before the
heading that changes the "chapter".

Ug. Doing it by hand would be faster than this.
 
S

Stefan Blom

Work around the problem by making sure that each new chapter
(top-level built-in heading) is the first paragraph in a new
"Next page" section.

--
Stefan Blom
Microsoft Word MVP


in message
news:25A1B8FD-06FF-4178-9327-F7AAA9CFEEFB@microsoft.com...
 
G

GregW

Hmmm. I don't think I can do that. My page numbers are chapter-section-page.
So the last two tokens (section-page) are what word considers chapter
numbering. My chapters are one level above that and need to appear on the
correct page.

I suppose I might be able to use a heading that is hidden text or something
to force the section to be correct before the chapter title. Ugly but it
would probably work.

I could also break the document into several sub documents and define a
chapter variable in each one.

-- Greg
 
S

Stefan Blom

So you are saying that the style which provides the numbering must be
allowed to start anywhere on a page? If so, that's the root of the
problem.

--
Stefan Blom
Microsoft Word MVP


in message
 
Ad

Advertisements

G

GregW

Well yes. At least as the second paragraph.

I need to track the revision and revision date of each page. This must
appear at the top of each page and in a table at the beginning of the
document. So each page ends with either a section or page break. What I had
planned to do was have a style called "revision and date" and have that as
the style at the top of each page. Then I could build a table from that style
for the list of effective pages. However I think this will make some of the
page numbers incorrect.

I can hardly believe it, but I think this has to be done by hand.

-- Greg
 
Ad

Advertisements

S

Stefan Blom

If you haven't already, you may want to ask in a programming newsgroup
if there is a way to automate this.

--
Stefan Blom
Microsoft Word MVP


in message
 

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