Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2007

Tip: Looking for answers? Try searching our database.

IF fields disappear upon printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sasquatch - 13 Feb 2007 17:32 GMT
I have a Word doc that is merging data from an Access table (Office XP) and
there are merge fields in the doc (name, address, dates, currency values,
etc...) along with some {IF} fields for 7 classes that may or may not need to
show based on if the class's amount (merge field) is >0.

When the document opens all of the fields appear as needed but as soon as I
either preview or print the document, the {IF} fields will all vanish.  Here
are my fields:

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

Can anyone give me any clues as to why these IF statements vanish upon
printing?

Thanks in advance.
macropod - 13 Feb 2007 21:49 GMT
Hi Sasquatch,

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.

Cheers

Signature

macropod
[MVP - Microsoft Word]

| I have a Word doc that is merging data from an Access table (Office XP) and
| there are merge fields in the doc (name, address, dates, currency values,
[quoted text clipped - 14 lines]
|
| Thanks in advance.
Sasquatch - 13 Feb 2007 22:39 GMT
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.
=============

SO, having said all that, why is it that once the document previews/prints
the IF statements won't print these sentences?
macropod - 14 Feb 2007 07:34 GMT
Hi Sasquatch,

Are you actually running the mailmerge, or just previewing it from the master? Also, were *all* the braces (ie '{ }') created by
Ctrl-F9, or did you simply type them? If its the latter for any of them, the fields concerned won't work

Cheers

Signature

macropod
[MVP - Microsoft Word]

| Maybe I didn't explain this well enough...
|
[quoted text clipped - 34 lines]
| SO, having said all that, why is it that once the document previews/prints
| the IF statements won't print these sentences?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.