Problem Merging witn Nested Conditions

T

Tom Bean

I have a mail merge document containing the following:

{ IF { MERGEFIELD ExpirationDate } <> "" { IF { MERGEFIELD ExpirationDate \@
"yyyyMMdd" } < { DATE \@ "yyyyMMdd" } "Your insurance expired on {
MERGEFIELD ExpirationDate }.<Enter>
" "{ IF { MERGEFIELD Amount } <> "" "Your insurance limit is { MERGEFIELD
Amount }.<Enter>
" }}}

where <Enter> is hitting the "Enter" key.

My data source contains an ExpirationDate less than the current date, e.g.
1/1/2006.

When I merge the data into a Word document, everything works fine and the
document contains "Your insurance expired on 1/1/2006".

When I merge the data into an eMail message, the following text is in the
message: "Your insurance expired on <<ExpirationDate>>."

I have removed and reentered the ExpirationDate merge field and the results
stay the same.

Does anyone have any suggestions about what I can do to resolve this
problem?

Thanks,
Tom
 
P

Peter Jamieson

I see the same thing here, but only when I merge to HTML format.

Using e.g.

{ SET LExpDate { MERGEFIELD ExpirationDate } }{ IF { MERGEFIELD
ExpirationDate } <> "" { IF { MERGEFIELD ExpirationDate \@
"yyyyMMdd" } < { DATE \@ "yyyyMMdd" } "Your insurance expired on {
LExpDate }
..<Enter>
" "{ IF { MERGEFIELD Amount } <> "" "Your insurance limit is { MERGEFIELD
Amount }.<Enter>
" }}}

works OK here.

Peter Jamieson
 
T

Tom Bean

Peter,

I implemented you suggestion and the "SET" solved the problem with the
eMail.

Thanks very much,
Tom
 

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