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!