?
Solved

Automation Field in MSWord...

Posted on 2002-04-02
6
Medium Priority
?
258 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

850 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