Problem with MS Word Mail Merge

  Nosmas 10:59 16 Jun 2003

I am trying to set up some mailing labels, using Mail Merge in MS Word from Office 97. The following is the Mail Merge conditional coding for the first line, but for the purposes of this posting I am using the character ^ to represent a space. Also the fields would normally appear as {^MERGEFIELD^Title^} but again for the purposes of this posting I am abbreviating this to {Title}. I am also using the "curly" brackets from the keyboard and not the character obtained in Mail Merge when inserting merge fields. Hope this will be clear when the text appears in the Forum.

{Title}^{^IF^{Init2} >"^""{Init1}^{Init2}^{Lastname}""{Init1}^{Lastname}"^}

The problem I am having is that where the source record doesn't have a second initial an extra space is being inserted between the first initial and the last name viz:-

Mr.^A.^^Smith instead of Mr.^A.^Smith. When a second initial is present the line is correctly shown as Mr.^A.^B.^Smith

Can anyone please suggest an amendment to the code to achieve the desired result?

  Nosmas 11:04 16 Jun 2003

For some reason my text for the IF condition has not come through properly. It should read

IF {Init2} < > "^" i.e. If Init 2 is not equal to "blank".

  Nosmas 11:06 17 Jun 2003

Thanks for the suggestion. I got some odd results at first, but after some experimentation I found the answer. When comparing Init2 with "blank", IF {Init2}<>"^" should be IF {Init2}<>"" i.e. there should not be a space between the two double quotes.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Samsung Galaxy S10 review

Butcher Billy's Black Mirror artwork is coming to vinyl for the first time

Is the Apple Store down? What's Apple launching?

Comment modifier le DPI d’une souris ?