Share via

Regenerating my document's Index messes up a Section Break

Anonymous
2018-08-27T20:59:12+00:00

When I regenerate the index in my Word for Mac 2016 document, which overwrites the current index I have with the new one, it messes up my sections, pagination, and page numbering. I have Microsoft Word for Mac v.16.16 (180812).

I have a 200 page document with two sections.  The first section contains a title page and table of contents, and the page numbers are numbered i, ii, iii, etc.  The second section is the body of the document and the page numbers are numbered 1, 2, 3, etc.  Generating the table of contents was no problem.  But when I began marking text for the index, I ran into a problem.  I started marking text on the first few pages of the index, and then generated the index as a test.  That was fine.  I then continued marking text on a few subsequent pages, and regenerated the index as another test to see how it was shaping up.  But the page numbers in the index this time were messed up.  Actually, the index was fine.  What got messed up was the body of the document itself.  The Section Break (Next Page) that I had to separate my table of contents from the main body of the document was now a Section Break (Continuous), and the last page of my table of contents was merged with the first page of the main body of the document, and that page was numbered xi.  The second page of the main body of the document was numbered 12 (instead of 2).

So I did some testing and narrowed down the bug to just a bare bones document as follows.    I created a document with 5 pages.  I ended up not even needing to bother with having page i, ii, 1, 2, 3.  I just had them numbered 1, 2, 3, 4, 5.  After generating the index the first time, here's what I had on each page:


Page 1:  My index on p.1{XE "My index on p.1" }

<Page Break>

Page 2:  My index on p.2{XE "My index on p.2" }

<Section Break (Next Page)>

Page 3:  My index on p.3{XE "My index on p.3" }

<Page Break>

Page 4:  My index on p.4{XE "My index on p.4" }

<Page Break>

Page 5:

Index

<Section Break (Continuous)

My index on p.1, 1

My index on p.2, 2

My index on p.3, 3

My index on p.4, 4<Section Break (Continuous)


That's all fine and good.  Then I just selected the index on the fifth page and simply hit the Delete key on my keyboard to delete it (I didn't even bother needing to regenerate the index, since I narrowed down the problem to just the deletion of the index).  I then scrolled up, and here is what I discovered:


Page 1:  My index on p.1{XE "My index on p.1" }

<Page Break>

Page 2:  My index on p.2{XE "My index on p.2" }

<Section Break (Continuous)>

My index on p.3{XE "My index on p.3" }

<Page Break>

Page 3:  My index on p.4{XE "My index on p.4" }

<Page Break>

Page 4:

Index


Sure enough, it was the same symptom I had in my actual 200 page document.  The Section Break (Next Page) was replaced with a Section Break (Continuous), just by deleting the index.

Is this a known bug?  I tried Googling it, as well as searching in this forum, but found nothing like it.  The problem of course is that there is no way that I can generate an index in a 200 page document and not need to regenerate it at some point.  Is this just a Mac issue, or Word in general?  Is this a known bug, and a super major one at that?  Is there a workaround?

I would appreciate any help.

Thanks,

Gary

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Paul Edstein 82,861 Reputation points Volunteer Moderator
2018-08-29T03:43:22+00:00

Your original post said:

When I regenerate the index in my Word for Mac 2016 document, which overwrites the current index I have with the new one, it messes up my sections, pagination, and page numbering.

but your movie shows you deleting the Index - and its two Section breaks - instead. Regenerating/refreshing an Index does not require the existing one's deletion.

I note, too, that your 'before' document has the Next Page Section break as shown in your movie, but only the second of the two Continuous Section breaks shown therein. If I select from the Index to the end of the document, then delete, there is no conversion of the Next Page Section break to a Continuous Section break; that only happens if, for example, only the Index is deleted.

The conversion of a preceding Next Page Section break to a Continuous Section break when a Continuous Section break is deleted without deleting the entire Section that follows it is something Word has done for decades. That's just one of the quirks in how Word behaves with its handling of Section breaks.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2018-08-29T23:26:42+00:00

SOLUTION INTRODUCTION

Caveat:  I'm by no means an expert in MS Word at all (though I am a computer programmer--hence my ability to do this analysis).  So I may be wrong here, and am open to anyone correcting me.

Ok, Paul is correct about the issue with deleting Section Break (Continuous).  Thank you, Paul, for clueing me in.  I don't know if it has been an MS Word problem for decades, but I think there is definitely a "quirk", if not a bug, now.  I have done some more testing, and it turns out it's not an Index issue at all.  The problem involves the deletion of a Section Break (Continuous).  It just happens that deleting an Index involves deleting a Section Break (Continuous) (in fact, deleting an Index involves the deletion of two Section Break (Continuous) marks, but the second one is irrelevant to the bug;  the deletion of one Section Break (Continuous) is all that is needed for the buggy symptom to appear).

By the way, Option-F9 in MS Word to toggle between the field codes & results does work on my Mac computer after all.  I just didn't notice it when I tried it because I was just looking at the top of page 1 when I was pressing the key combination, and that was just showing the XE field code for my fruit example (that I showed in my video).  When I later happened to be looking at the generated Index on the last page and pressed Option-F9, lo and behold I saw it toggle between the generated Index and the code: { INDEX \h " " \c "1" \z "1033" }.  And I saw the page number toggle between the page number and the code: { PAGE }.  There you go, the result vs. the code.  I apologize.

Also note that my initial discovery of this bug with the regeneration of my Index can be explained because regeneration of an Index makes MS Word behind the scenes first delete the Index, along with its two Section Break (Continuous) marks, before inserting the new Index.  In my video I focused in on deleting the Index (rather than regenerating it) because I realized that the problem was the deletion, not the regeneration.  Of course, it turns out that it doesn't have to do with Indexes at all (regeneration or deletion of them), but rather the Section Break (Continuous) mark.

What I don't understand is why I'm the first person (as far as I can find) to discover this issue with regenerating the Index.  Surely others that have large enough documents to require an Index have multiple sections in their document, and need to regenerate the Index multiple times as they are making it, no?  I can't be the first to at the very least have at least one section containing the Table of Contents, with pages i, ii, iii, etc., and the main document with pages 1, 2, 3, etc.  Maybe I'm just the first in the Mac part of the forum, and this issue has already been discussed in the Windows part of the forum, which must have a LOT more users.  I haven't searched for this issue in the Windows part of the forum.

SOLUTION SUMMARY

I provide some scenarios below to focus in on the specific problem with deleting a Section Break (Continuous) mark, and how to solve it.  It's not really a "good" solution at all, because it involves deleting parts of your document you may not want to delete.  The bottom line is that if you delete a Section Break (Continuous) mark, then you have to delete everything from that Section Break (Continuous) mark until and including the next Section Break (Next Page) mark;  if there is no Section Break (Next Page) mark that comes after the Section Break (Continuous) mark you are deleting, then you have to delete everything from the Section Break (Continuous) mark to the end of the document.  If the stuff you are deleting needs to go back in again, then you will have to make a copy of it first before deleting it, and then paste it back in again afterwards.  Unfortunately, my own experimenting with pasting in stuff that includes section breaks did not go well:  it messed some of those section breaks up (they did not paste exactly as the original).  The bottom line is that Microsoft Word is buggy when it comes to section breaks, imho.

So the solution to regenerating an Index is to first delete the Index, from the start of the Index (the first Section Break (Continuous) mark that is at the beginning of the Index), to the end of the Index (the second Section Break (Continuous) mark that is at the end of the Index), AND TO DELETE EVERYTHING AFTER THE INDEX UNTIL THE VERY END OF THE DOCUMENT, which normally may just be an extra carriage return or two, assuming the Index is at the very end of your document.

SOLUTION DETAILS

As you will see, my example below involves vegetables as my text.  In all the following scenarios, we are deleting the Section Break (Continuous) that comes after the Kale.  The Section Break (Next Page) that we want to watch to see if it changes after the delete is the Section Break (Next Page) after the Corn.  I have also used two letters after each Section Break in my examples to indicate which one it is so you don't get confused (e.g. <Section Break (Next Page) BC> has BC because it comes in between Broccoli (B) & Cabbage (C);  <Section Break (Continuous) KL> has KL because it comes in between Kale (K) & Lettuce (L)).

SCENARIO #1(a): ****If the Section Break (Continuous) you are deleting is the last section break in the document, and if the immediately previous section break is a Section Break (Next Page):

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Next Page) CD>

Dill

...

Kale

<Section Break (Continuous) KL>

Lettuce

Peas

END OF MY DOCUMENT

and if you don't delete everything until the very end of the document along with that Section Break (Continuous), then that immediately previous Section Break (Next Page) will be changed to a Section Break (Continuous):

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Continuous) CD>

Dill

...

Kale

Peas

END OF MY DOCUMENT

As you can see above, when I deleted the Section Break (Continuous) KL + Lettuce, but left the Peas, it changed the Section Break (Next Page) CD after the Corn to Continuous.

SCENARIO #1(b):  But if I also delete the Peas, then it doesn't:

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Next Page) CD>

Dill

...

Kale

END OF MY DOCUMENT

As you can see, if I delete the Section Break (Continuous) KL + Lettuce + Peas, it left the Section Break (Next Page) CD after the Corn alone.

Note that if the section break immediately previous to the Section Break (Continuous) you are deleting is a Continuous one, rather than a Next Page one, or if there is no previous section at all, then everything will be fine when you delete the Section Break (Continuous) you are deleting, no matter how far down you go in the deletion.  So if the CD (Corn-Dill) section break was Section Break (Continuous) CD instead of Section Break (Next Page) CD, then it will stay a Section Break (Continuous) after the deletion and everything will be fine.

SCENARIO #2:  If the Section Break (Continuous) you are deleting is NOT the last section break in the document, and if the immediately previous section break is a Section Break (Next Page), and there is no Section Break (Next Page) that comes after the Section Break (Continuous) you are deleting (such as in the following example, where all the section breaks after the one we are deleting are all Continuous):

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Next Page) CD>

Dill

...

Kale

<Section Break (Continuous) KL>

Lettuce

Peas

<Section Break (Continuous) PR>

Radish

<Section Break (Continuous) RS>

Spinach

END OF MY DOCUMENT

and if you don't delete everything until the very end of the document along with that Section Break (Continuous), then that immediately previous Section Break (Next Page) will be changed to a Section Break (Continuous):

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Continuous) CD>

Dill

...

Kale

<Section Break (Continuous) RS>

Spinach

END OF MY DOCUMENT

As you can see, if I left that last section with Spinach, instead of deleting right to the very end of the document, then the Section Break (Next Page) CD after Corn changed to Continuous.

SCENARIO #3a:  If the Section Break (Continuous) you are deleting is NOT the last section break in the document, and if the immediately previous section break is a Section Break (Next Page), and there is another Section Break (Next Page) that comes after the Section Break (Continuous) you are deleting:

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Next Page) CD>

Dill

...

Kale

<Section Break (Continuous) KL>

Lettuce

Peas

<Section Break (Continuous) PR>

Radish

<Section Break (Next Page) RS>

Spinach

<Section Break (Continuous) ST>

Turnip

END OF MY DOCUMENT

then you have to delete everything up until that next Section Break (Next Page).  If you don't, then that immediately previous Section Break (Next Page) will be changed to a Section Break (Continuous):

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Continuous) CD>

Dill

...

Kale

Radish

<Section Break (Next Page) RS>

Spinach

<Section Break (Continuous) ST>

Turnip

END OF MY DOCUMENT

As you can see, I failed to delete Radish and the Section Break (Next Page) RS that comes after it, and my Section Break (Next Page) CD after the Corn changed to Continuous.

SCENARIO #3b:  If I do delete everything from my Section Break (Continuous) KL after the Kale up until and including the Section Break (Next Page) RS after the Radish, then my Section Break (Next Page) CD after the Corn is left alone:

START OF MY DOCUMENT

...

Broccoli

<Section Break (Next Page) BC>

Cabbage

...

Corn

<Section Break (Next Page) CD>

Dill

...

Kale

Spinach

<Section Break (Continuous) ST>

Turnip

END OF MY DOCUMENT

As you can see, I don't have to delete everything from my Section Break (Continuous) KL after the Kale to the end of the document:  I just have to delete everything from my Section Break (Continuous) KL after the Kale up until and including the next Section Break (Next Page) (i.e. RS).  I still left the last Section Break (Continuous) ST + Turnip there.  My Section Break (Next Page) CD after the Corn was left alone.

I hope this all makes sense, and I hope I'm correct in my analysis.  Let me know if I'm not.

Thanks,

Gary

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2018-08-29T01:44:54+00:00

    Your continuous Section break is indeed within the range spanned by the Index field. If you press Option-F9 to toggle the field code display 'on', you'll see that the Section break disappears.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2018-08-28T10:16:37+00:00

    Your description suggests the Section break was placed somewhere within the range spanned by the Index field. It would be impossible for refreshing the Index to have any effect on one otherwise.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2018-08-28T09:40:47+00:00

    Hi Gary,

    We could totally understand your frustration about encountering the situation and we are willing to help you try figuring it out.

    Based on my test, I didn’t meet the issue.

    To help me check if there is any miss when I test, can you provide a reproduce video which is include how to index the file and delete the index?

    Besides, I also want to collected the affected file, as we need to confirm if the issue is related to it.

    To protect your privacy, I've sent you a private message to collect the information. You can access it via private message

    Regards,

    Qing

    Was this answer helpful?

    0 comments No comments