Solved

Automation Field in MSWord...

Posted on 2002-04-02
6
252 Views
Last Modified: 2008-03-10
Hi,

In order to make the footer of a document display informations only on the last page, i added an automation 'field' (IF) in the footer.  Since the syntax of the IF statement is supposed to be... :

IF Expression1 Operator Expression2 TrueText FalseText

...I added this field :

{ IF PAGE = NUMPAGE "LAST" "NOT LAST" }

I tought that on the last page of the document it would be wrote "LAST" and on the other ones the words "NOT LAST", but it seems that all pages display "NOT LAST" event the last one... Is there someone who can tell me what i do wrong ???

Thanks,

Freg.
0
Comment
Question by:freg
  • 3
  • 3
6 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 6913157
Hi freq,

You could try

{ IF PAGE=NUMPAGES "LAST" "NOT LAST" }

take away the spaces and add the S

HTH:O)Bruintje
0
 
LVL 1

Author Comment

by:freg
ID: 6913648
That's ok for the S, i just forgot to write it before...

But no matter on wich page the field appears, it still write 'LAST', as if the condition PAGE=NUMPAGES was always True, even on the last page...

It seems that it just doesn't work !  :-(
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6913818
All right this is a fun one learning somthing new ;)

{IF {PAGE}={NUMPAGES} "LAST" "NOT LAST"}

i had one with true and false that worked, what happens is the fieldcodes have to evaluated to their value and so PAGE and NUMPAGES have to entered as fieldcodes

:O)Bruintje
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:freg
ID: 6913948
It seems that it's still not working... :-(

I did not understood your last sentence.  Could you explain please ?

Merci,

Freg.
0
 
LVL 44

Accepted Solution

by:
bruintje earned 100 total points
ID: 6914392
OK i'll try to make this as clear as possible

-first insert an IF field without anything else in the expression
-then after the IF use ALT+SHIFT+P to insert a Page field
-toggle the fieldcode of the page number
-then you have {IF{PAGE}}
-next type the equal sign then you get {IF{PAGE}=}
-next insert another page field, toggle the fieldcode and change it to NUMPAGES
-now you have something like {IF{PAGE}={NUMPAGES}}
-now you can enter the rest of the expression and end up with
-{IF{PAGE}={NUMPAGES}"True" "False"}

HTH:O)Bruintje
0
 
LVL 1

Author Comment

by:freg
ID: 6915340
Ok, i didn't know that i had to 'insert' a new field for each field type (Page, NumPage).  I was just typing de words without specifying that it was fields.... Thank you so much !

Freg.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
Outlook Free & Paid Tools
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question