View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sasquatch Sasquatch is offline
external usenet poster
 
Posts: 3
Default IF fields disappear upon printing

Maybe I didn't explain this well enough...

They vanish because you'd normally want the field results to be
printed, not the field codes. If you want to print the field code,
check the 'field codes' option under Tools|Options|Print.


I don't want to see the field codes, it's the field results I'm after. The
problem is that when the document opens the necessary field results are
visible BUT when I preview or print the document then nothing shows for those
fields results...as if they don't exist.

Here is an example of the IF statements I'm using:

{ IF {MergeField Class1Amt } 0 "A. { MergeField Class1Text }" "" }
{ IF {MergeField Class2Amt } 0 "B. { MergeField Class2Text }" "" }
etc...
{ IF {MergeField Class7Amt } 0 "G. { MergeField Class7Text }" "" }

So, for instance, if Class1Amt and Class2Amt are both greater than 0 and the
other ClassAmts equal 0 then it will show:
=============
A. some text...
B. some text...
=============
and the other 5 classes stay hidden (which is exactly what I want) BUT when
the document previews or prints all 7 classes are hidden, as if all the
ClassAmts = 0.

I played around with the statements and found that if I remove the {
MergeField Class#Text } from the "True" results then when I previewed/printed
the document it would in fact show the results.
=============
A.
B.