Conditional Text/Mail Merge

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi Folks - I create mail merges from a commercial software package. One of
the merge documents can have up to 4 letters included. The 4 letters
correspond to the number of borrowers for a particular case. So, if there is
only one borrower, we need only one letter. If there are 4 borrowers, we
need 4 letters. I am familiar with IF fields, but I'm not quite sure how to
prepare this document.

I'd like to have all 4 letters in one document, then somehow suppress the
letters that are not needed. Something like IF BORROWER4 is NOT EMPTY, then
include all four letters, IF NOT, IF BORROWER3 is NOT EMPTY, then include 3
letters, etc. Any ideas? Thanks.

Michael
 
You could do that provided all the borrowers are in the same record, though
it is a bit fiddly to set up.
Start with the four letters each separated by a page break.
Select the final letter including the preceding page break and press
CTRL+F9 to make it into a field.
Add a double quote " before the final bracket }.
Go to the first bracket { and Type IF then CTRL+F9 ie {IF {}
Between the added brackets type Mergefield Borrower4
After the closing bracket Type
<> "" "
So you should have
{IF {Borrower4} <> "" "Letter 4 here"}
Repeat, only this time select the last TWO letters
{IF {Borrower3} <> "" "Letters 3 & 4 here"}
Repeat, only this time select the last THREE letters
{IF {Borrower3} <> "" "Letters 2, 3 & 4 here"}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Graham - Thanks ... Let me ask the question another way ... If you had to do
this, would you use the approach you mentioned, or would you use a different
approach?

Michael
 
I have never had occasion to do this, other than to test the premise, but
this method will do the job.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Back
Top