Fields: IF with inner { PAGE} does not work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to insert initials to the footer on every page of my kind of
law-related document except last page (last page would contain the
signatures). I am trying to use IF field as follows: { IF { PAGE } = {
NUMPAGES} "{ PAGE }" "{ NUMPAGES }" }. I get PAGE. Even this simple
expression does not work: IF { PAGE } = 1 "yes" "no". This returns PAGE as
well.

Please help! I found some examples on your site but they were not helpful.

Thanks,
Michael
 
Try this instead:

{ if { page } < { numpages } "initials" }

or

{ if { page } < { numpages } "initials" "whatever goes in last page footer" }

And be sure you enter the { } braces with the Ctrl+F9 command (don't type
them).
 
Oh, yeah... and press Alt+F9 to switch between display of field
codes and field results.
 
Thanks for your suggestion! I tried that. When I enter using Ctrl+F9 and then
switch from field view to normal view it does not show anything. Just
nothing. Interesting point is that if I enter same via Insert->Field it shows
PAGE although in field view it looks exactly the same as when entered with
Ctrl+F9. This should be some bug in Word... BTW I use Word 2003 SP2.

Thanks,
Michael
 
Oops. Word 2003 SP1.

Michael said:
Thanks for your suggestion! I tried that. When I enter using Ctrl+F9 and then
switch from field view to normal view it does not show anything. Just
nothing. Interesting point is that if I enter same via Insert->Field it shows
PAGE although in field view it looks exactly the same as when entered with
Ctrl+F9. This should be some bug in Word... BTW I use Word 2003 SP2.

Thanks,
Michael
 
You probably need to select the field and use F9 to update it. Or, using
Print Preview will also cause it to update.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
No, this does not help. I used right-click->Update field but both this and F9
does not solve the issue.
 
I'm not sure I understand what the issue is now.
1. Are you working in Print Layout view? Is the "White space
between pages" option checked in Tools | Options | View?
2. Did you put the conditional page field in the footer, or
in the body of the page? The field should be in the footer.
3. Do you have any section breaks in the document? If yes,
and if the footers are not "same as previous" from one section to
another, then you need to put the conditional page field in the
footer of every section.
 
OK, more information:
- Yes, I am in Print Layout View. White space between pages is checked. This
is actually always when I work in Word.
- I tried document body, header and footer. I would expect to have the same
result no matter where I place this field and I have the same result: when I
enter the field using Insert->Field I get "PAGE", when I enter the field
using Ctrl+F9 I get "" i.e. empty.
- I don't have any section or page breaks anywhere in my document.

Thanks,
Michael
 
Obviously, something is not correct about what you are doing. If you want
to send the document to me, I will take a look at it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top