Marko:
You cannot tell Word to search only "within" the current page.
There are two solutions. The easiest is to pre-populate your Headings 1 and
2 with generic text, using dummy Heading 1 and Heading 2 styles up the front
of the document. You can arrange for these to "not appear" by formatting
them as small or white, or by adding headings you do not mind having in the
document.
The other solution is to create a Character style to refer to for the
StyleRef. You can then "tag" the text you want to appear with the character
style. Set the format of the character style to "The underlying paragraph
properties" so that it does not change the appearance of text it is applied
to.
The consideration of the character style method is that you must ether mark
every heading you want to appear, or add a third component to your IF
statement.
Hope this helps
On 21/1/05 7:55 PM, in article rs3Id.8433$F6.1497608@news.siol.net, "Marko
Pinteric" <marko@pinteric.com> wrote:
> In technical documentation for a civil engineering project there has to
> be heading reference in footer - but level dependant. If page includes
[quoted text clipped - 24 lines]
>
> Thanks, Marko Pinteric.

Signature
Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.
John McGhie <john@mcghie.name>
Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
Marko Pinteric - 24 Jan 2005 10:51 GMT
If I understand right, solution No 1 will create additional fields in
the table of contents, which I do not want to. I do not understand
exactly what did you mean with the solution No 2 - but it seems that it
is no longer automated.
However, you gave me inspiration for the third possible solution, which
is ALMOST perfect. I created hidden cross-reference to Heading 2 (named
first_heading2) in the very beginning of the document. Then I use
{IF "{STYLEREF "Heading 1" \n}.2"<{REF first_heading2 \h} {STYLEREF
"Heading 1" \n} {IF {STYLEREF "Heading 1" \n}>{STYLEREF "Heading 2" \n}
{STYLEREF "Heading 1" \n} {STYLEREF "Heading 2" \n} }
So what I get is following (first_heading2 has value "5.1"):
Page number: Heading on page: Footer text:
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5.1
6 5.1 5.1
7 5.2 5.2
8 5.3 5.3
9 6 6
10 6.1 6.1
11 6.2 6.2
12 6.3 6.3
Well there is a small BIG problem remaining, it is written 5.1 on page
with heading 5! I would like to add another IF but I don't know which.
On both pages 5 and 6 {STYLEREF "Heading 1" \n} has value 5 and
{STYLEREF "Heading 2" \n} has value 5.1 so I cannot distinguish between
those two pages. Do you have any idea how to do that?
Thanks, Marko.
> Marko:
>
[quoted text clipped - 17 lines]
>
> Hope this helps