2

I have a document that requires the heading to contain the item number (level 3 heading) that is being continued onto that page from the previous page. Using the Field insert and StyleRef, I can make the heading show either the item that appears first or last on that page- but I can't make it reference the page before. Could a little bit of VBA do the trick? Anyone had to do this before?

  • See this posted example document for a solution, entailing a rather painful use of SEQ fields. – harrymc Jun 6 '18 at 7:49
  • Wow, @harrymc, that is phenomenal. Thank you. And you are right about painful. I'm guessing this would be a horrid idea in a super large document just based on resource usage alone, much less the tricks required to update. But it gives me something to think about - mostly, that we will probably continue to skirt this insane requirement as best we can. I'm thinking you deserve the bounty just from this sample. – hudsonsedge Jun 6 '18 at 16:56
  • 1
    Done as requested. – harrymc Jun 6 '18 at 18:56
1
+50

I have found this posted example document as a solution, entailing a rather painful use of SEQ fields.

The document contains its own documentation with examples. It says:

This document shows one way that you can use field codes in Word to display simple messages along the lines of “Section N continued from previous page” and “…Section N continues on next page” in the document footer and header, as required, where “N” is a section number. In this example, we are getting the Section numbers from the heading numbering of Heading 1 paragraphs. There are other possibilities.

This approach was constructed from an earlier attempt to do Table continuations, and could probably be simplified in various ways.

As it stands, the approach requires

  • continuous page numbering – it might work in some section-page numbering scenarios, but probably only by accident. Dealing with two or more numbering schemes per document using field codes alone is not trivial, and may not even be possible.
  • users who understand how to use field codes, and understand how this particular solution works. In this case, in addition to having an understanding of how field codes work in general, they will also need to ensure that each "section" starts with a certain set of field codes, and each "section" also needs to end with a certain set of field codes.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.