Print Field in an If Field

G

Guest

Spent days and days on this now. Word 2003 SP2.
Why would this not work?....

{IF 1 <> 2 "NotEquals
...............Page Break.............
{PRINT 27 &l20H}" "Equals"}

The hardcoded text and page break are picked up fine. The print field is
completely ignored. The print field works outside of the IF. It seems to me
the IF is resolving the Print field to text. Everything I've read suggests
this should work. I have emebedded using both Insert Field and CTRL F9 and
updated field.
Real tears, help me please!
 
G

Guest

I have worked around for now by putting the if in the print instead for
example.
{PRINT {IF 1 <> 2 "27 &l20H" ""}
And having other ifs either side of that for the text.
Its messy and I'd still like to know what was going on.
 
C

Cindy M.

Hi =?Utf-8?B?V29yZHlXZWV6ZQ==?=,
I have worked around for now by putting the if in the print instead for
example.
{PRINT {IF 1 <> 2 "27 &l20H" ""}
And having other ifs either side of that for the text.
Its messy and I'd still like to know what was going on.
Originally, Word was designed that you had to put the IFs IN the other
fields. Word updates "from the inside out", so the evaluation you were
interested took place after the nested field was already updated. About
ten years ago, Microsoft changed the behavior - at least for most of the
"common" fields. Note, however, that this was done "over" the original
core code.

I don't know it for a fact, but I'd guess that Microsoft simply didn't
make this change for the Print field, which was "deprecated" at about the
same time (meaning Microsoft no longer supports it, advises not to use it
and only keeps it around since older documents might contain it
(="backwards compatibility")). Be happy it works at all :)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top