Solved

Automation Field in MSWord...

Posted on 2002-04-02
6
249 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:freg
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: dandraka
There are several quick shortcuts that can make your life easier in Microsoft Programs.  These simple tips and tricks will your work more productive and you faster at completing your tasks! MS Word (1) Creating Re-usable Scraps You can create s…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
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 …

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now