Re: Evaluating a MERGEFIELD = "RET"
- From: Michael Holz <MichaelHolz@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Jun 2007 12:56:01 -0700
I was too lazy to read the whole post, but with your information I was able
to figure out what to do and then had a good explanation to get started at
understaning it a little more completly.
I invested my time instead in some hands on learning and found that you did
have to use the Bookmark somewhere in the template document before it would
cause the "inconsistancy" and automatically translate the RET brought in by
the merge field into the bookmark value.
It appears that it is double translating unless we put the quotes around the
reference to the datafile. But I think that was making it even more of a
challenge is that the double translation is not happening all the time. The
reference is treated as just a reference to the datafile if you don't use the
bookmark reference elsewhere in the template.
I don't think the mere existence of the bookmark in a referenced document
(for expamle I have multiple references to a bookmark collection and am
referencing other bookmarks from the file containing the collection) until
you use that specific bookmark in the template document, which makes a LITTLE
more sense after I thought about it.
Thanks again for the help, keep up the good work.
It looks like once a reference is made within the template, that it likes to
take a little shortcut and remember that reference translation.
"Peter Jamieson" wrote:
Try.
{ IF "{ MERGEFIELD AdmitType }" = "RET" "test" "what" }
(If field syntax cannot in the general case be as minimal as is generally
thought - however, in this case, the chances are that the problem is caused
by having a bookmark called RET in your document).
Peter Jamieson
"Michael Holz" <Michael Holz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13A98DBD-30B8-4C70-8DB1-3F08E4CEBBEA@xxxxxxxxxxxxxxxx
This is a really wierd one. I am guessing that "RET" may have some
reserved
meaning and it is interfering with my IF statement, but not sure.
So here is what I'm trying to do. In Office 2003, I'm doing an
INCLUDETEXT
thing when a certain MERGEFIELD = "RET" which is something that we pull to
a
data .csv file from our database. I've dumbed it down for myself for
testing
to take out all but the easy stuff so I could make sure that I isolated
the
problem, and I still see this odd issue.
Here's what I've been using for testing when I discovered this issue.
"{IF{ MERGEFIELD AdmitType } = "RET" "test" "what"
No matter what I do this always outputs: what
I have verified that the field in the data file does in fact contain "RET"
by just printing "{MERGEFIELD AdmitType}" in the form letter. The
Mergefield
by itself in the form letter prints "RET"
In addition, I've also changed a single letter in the datafile so that
{MERGEFIELD AdmitType} contains "REM" and then changed the one character
in
the line of code so that the line of code reads:
"{ MERGEFIELD AdmitType } = "REM" "test" "what"
Then the output in the merge finally reads: test
Any suggestions as to how to get around this? Is there some type of
escape
character? Or is anyone else even able to duplicate this?
- Follow-Ups:
- Re: Evaluating a MERGEFIELD = "RET"
- From: Ed
- Re: Evaluating a MERGEFIELD = "RET"
- References:
- Re: Evaluating a MERGEFIELD = "RET"
- From: Peter Jamieson
- Re: Evaluating a MERGEFIELD = "RET"
- Prev by Date: Re: Header and footer macro
- Next by Date: Re: Check if macro running from email
- Previous by thread: Re: Evaluating a MERGEFIELD = "RET"
- Next by thread: Re: Evaluating a MERGEFIELD = "RET"
- Index(es):
Relevant Pages
|