more than one name (maybe) in greeting line.

T

theoldmole

I want my greeting line to say:

Dear Mr. Smith and Ms. Jones,

if there is a Ms. Jones (title2 and lastname2)

Dear Mr. Smith,

if there's no Ms. Jones,

Dear Friends,

if there's no Mr. Smith or Mr. Jones.

Here's how I've set it up. I don't know if this will show up if I print
it exactly as I see it on the page, so I'll substitute < for {

Dear said:
<MERGEFIELD "Title2" > <MERGEFIELD "Last_Name2" >,

When this merges, I get

Dear Mr. SmithandMs. Jones,

When there's no Ms. Jones, I get

Dear Mr. Smith , (space before comma)

When it's "friends," I get

Dear friends ,


How do I fix this?
 
G

Graham Mayor

It would be better if you copied the fields exactly to reveal the extra
space (you could use the macro at http://www.gmayor.com/export_field.htm to
aid that) which should probably give you something like:

Dear { IF{ Mergefield Title } = "" "Friends" "{ Mergefield Title } {
Mergefield Last_Name }"}{ IF{ Mergefield Title} = "M??" " and { Mergefield
Title2 } { Mergefield Last_Name2 }" },

or

Dear { IF{ Mergefield Title } = "" "Friends" "{ Mergefield Title } {
Mergefield Last_Name }"}{ IF{ Mergefield Title2} <> "" " and { Mergefield
Title2 } { Mergefield Last_Name2 }" },


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


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

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