Salary review letter mail merge - many combinations. How to do?

M

Martin Jones

Hi all

I am preparing a mail merge letter linked to an Excel database for my
company's annual salary review process and need some help, please!

My database holds information for each of our 2000 employees,
including columns holding the following data fields:

basic salary
bonus payment
shift allowance
London weighting

I would like to be able to produce a single mail merge letter, that
when "merged" includes or excludes text depending upon whether or not
they will be receiving any of the above items. For example, one
employee might receive a salary increase, but not any of the other
payments, whereas another might receive all four payments.

So far, my letter includes a separate sentence for each salary item,
including the value from the appropriate mail merge field. If an
employee does not receive a bonus payment, I would want to exclude the
sentence which reads along the lines: "Your bonus is <<bonus
payment>>." I've looked at using IF/THEN/ELSE, but that doesn't seem
to be the way to go as it only seems to allow inclusion of text, not
the text AND the merge field value.

Can anybody suggest how I might approach this task?

Many thanks in advance

kind regards
Martin
 
P

Peter Jamieson

IF lets you include more or less any combinaiton of text,in-line objects and
fields, but you have to be careful with stuff such as double-quotes.

e.g. { IF "{ MERGEFIELD myfield }" = "Y" "include some text and { MERGEFIELD
myamount } and some more text" "" }

The trick is that you cannot use the ordinary characters { } in any fields,
including the nested MERGEFIELD fields: you have to use the special "field
code braces" that you can insert using ctrl-F9. So there are three pairs of
those in the above example, but everything else is plain text.

Peter Jamieson
 

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