A family of Microsoft word processing software products for creating web, email, and print documents.
The thing is that the equality "{PAGE}"="{PAGEREF{STYLEREF 1}}" will function (i.e. will evaluate to False) in almost all cases, so on the even pages you will get the text you want on all pages except the first in a chapter. It's that it works on that first page that is the mystery. Similarly on the odd pages, the first equality will function on all except the first page.
You can certainly email the doc to me - I believe my email is in my profile which you can reach by clicking on my name hereabouts, but will check later.
You can in a sense "step through" bits of a field code by selecting (say) one field within a nested code and pressing shift-F9 to display the result. It's easy to overselect. Also, It may not work so well in a header/footer.
I'm not aware of a field code that does exactly what you want. Perhaps someone else can think of one. I am a little wary of putting complex field code constructions in headers because
(a) Word (or Windows Word, at any rate) seems to update its headers quite frequently (which is one reason why some things work in headers immediately when you have to F9 them in the document body.) But at a certain point, this can become a performance issue and cause problems for the document's user, particularly as a document gets longer.
(b) the main mechanism I know for doing it relies on the user putting the right SEQ fields in the right paragraphs, all the time. That's a big ask. It's also simpler if you can rely on the correspondence between a section and (in this case) a chapter remaining simple - i.e. no extra Word sections to introduce a page layout change and so on, and simple page numbering (no restarts, so probably no chapter-page numbering).
However, suppose for example you could get your user to insert a { SEQ s0 \r{ PAGE #0 } \h } field in every Chapternum paragraph, a { SEQ s1 \r{ PAGE #0 } \h } in each heading 1 para, and so on, then you should be able to test, in a header, whether a Chapternum style paragraph exists on the current page, via
{ IF {PAGE #0 } = { SEQ s0 \c } ....}
and similarly for the H1/H2 styles.
Ideally, when using a scheme like this the user would be able to insert exactly the same fields in every (heading paragraph), so they don'y have to think about it so much, and so (for example) they could use the outliner more easily to promote/demote stuff. Usually that requires a whole bunch of fields. In this case yoou might be able to simplify a little by using H1,H2,H3 instead of a non-heading style + H1/H2 and leveraging the \s switch of the SEQ field, but I haven't actually worked it through.