• Annex page numbering (2003)

    Author
    Topic
    #434244

    I’m preparing a memorandum for my boss…12-15 pages. The main body is set up with the built-in styles (Heading 1, 2, etc.). Then come what we call the annexes: Annex A, Annex B, and so on. The annex pages are numbered A-1, A-2, B-1, B-2, and so on.

    We build one of these projects once a year, and this is my first time at bat, so to speak. In previous years, it appears the author built separate documents: the main body, then another document for Annex A, another for Annex B…you get the picture. Just now it occurred to me why they did that. They wanted to avoid having to monkey around with the page numbering problem. I’m trying to put the whole thing together in one document, but I’m having problems. I’ve worked on similar projects before, and I’ve gotten help from HansV, StuartR and others. (See post 446831. The problem I’m having involves using the StyleRef field. Here’s what I’ve done so far:

    First I created a clone of the Heading 1 style and called the new style “Annex” (based on Heading 1). I use the Annex style in the header of each annex. That’s working fine. I did have to go back and reset the numbering scheme for Heading 1 in the main body. (HansV had warned me I might have to do that in an earlier thread.)

    Next, in the footers of each annex, I inserted a StyleRef field to pick up the numbering from the annex header. (I used Insert > Reference….) What I expected to see in the footer was A-1, A-2, B-1, B-2 and so on. What I get when I press Alt+F9 is “Error! No text of specified style in document.” The field code reads like this:
    { STYLEREF Annex n * MERGEFORMAT }-1

    Well, I decided to try exactly what StuartR had said to do: Instead of linking the StyleRef to “Annex,” I changed it to “Heading 1.” But now I see, not the annex letter, but the number from the last Heading 1 paragraph in the main body of the document! (7-1, for example.)

    What’s the solution…anyone? Thanx!

    Viewing 0 reply threads
    Author
    Replies
    • #1023311

      Did you use Insert Field to insert your Styleref field?
      Did you select the style name “Annex” from the list in the Insert Styleref Field dialogue box?
      Where in the document is the paragraph formatted as Annex, and where is the Styleref field?

      StuartR

      • #1023316

        Yes, I did use Insert > Field…. to insert the StyleRef field, and I selected the style name “Annex” from the list.

        The paragraph formatted as Annex is in the header of each separate annex. By the way, I did separate the main body of the document from the annex with a section break (next page). The StyleRef field is in the footer of each annex section.

        Thanks for taking time to look at this!

        I’ve attached a cut-down copy of the document. Only Annex A has the StyleRef in the footer. You can disregard B and C.

        • #1023317

          Your problem is the fact that the Annex paragraph is not in the body of the document, it is in the header. When Word processes the Styleref field it looks backwards, through the body of the document, for the specified style. It can’t find it because there is no paragraph of that style in the body of the document. This is never going to do what you want.

          Why not put the Annex paragraph in the main body of the document, as though it is a section title (which is what it in fact is). Then the styleref in the footer will work perfectly.

          StuartR

          • #1023328

            Thank you, Stuart! You’re right, of course

            • #1023332

              There is no way that I know of to do this with Styleref, if you need the word Annex to come before the number in the heading it will appear in the same place in the footer.

              I guess your best alternative is to use a SEQ field to do the numbering and build up all the numbering schemes yourself.

              StuartR

            • #1023354

              Is there any way to use the style separator to do what I want? I’ve been monkeying around with this style separator thing, but no luck so far. Frankly, I’ve never used it before.

            • #1023362

              I can’t see how to do this. I can get the word Annex in front of the heading, and the number only appears in the Styleref, but the number itself doesn’t appear after the Style Separator and before the heading text.

              I’m off for a week in a little while, so I hope someone else can offer advice whilst I’m away.

              StuartR

            • #1023371

              Try adding the t switch to the StyleRef field:
              – Click in the field.
              – Press Shift+F9 to toggle field codes.
              – You’ll see something like

              { STYLEREF “Annex” n * MERGEFORMAT }

              – Make it look like

              { STYLEREF “Annex” n t * MERGEFORMAT }

              – Press F9 to hide fleld codes and update the field.

            • #1023555

              Hans:

              Your advice worked perfectly! Thanks a million!

              There’s one odd little problem: The annex letter appears in bold, so I get a page number that looks like this: G-1.

              I can’t find anything in the style that drives that bold formatting. Any ideas?

            • #1023556

              Try selecting the page number and pressing Ctrl+spacebar to remove character formatting.

            • #1023808

              I have a new problem with the page numbering. After our previous discussions, I built a new template that incorporates all the advice everyone has shared heretofore. Then I pasted the text from the original document into a new document built on the new template. Everything looks fine, except….

              Section 1 is the main body of the document. Page numbering for Section 1 is simply {Page} (in the footer). Each annex (A, B, C, etc.) is a new section. The page numbering field for the annexes is { STYLEREF “Annex” n t *MERGEFORMAT }-{ PAGE }. Each annex begins with a paragraph that uses the custom “Annex” style

            • #1023811

              Copying text from one document into another document must always be done with care. Word stores information about page setup and about headers and footers for a section in the section break at the end of the section, and for the last section in the document in the paragraph break at the end of the document (that’s why you can’t delete this paragraph break). So if you copy text from another document, you must take care not to include section breaks or the last paragraph break, unless you want to copy over page setup and headers and footers. Alternatively, use Edit | Paste Special with the Unformatted Text option. This means you’ll have to redo all formatting, but it’s a very “safe” method.

            • #1023812

              As I copied from the old document, I was careful not to copy the paragraph marks

            • #1023815

              Apart from instructing the users to be careful – not much, I think, unless you’re prepared to protect the document, so that users can only edit specific parts of it. But many users find this too restrictive.

    Viewing 0 reply threads
    Reply To: Annex page numbering (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: