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?
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.