How to suppress blank lines in mail-merge

Discuss the word processor
Post Reply
webmink
Posts: 2
Joined: Wed Nov 28, 2007 12:35 pm

How to suppress blank lines in mail-merge

Post by webmink »

I've successfully generated a mail-merge that makes mailing labels for UK addresses. I want to have the County on a line by itself when it occurs in an address. I can't work out how to do that and avoid having a blank line on the label when the address has no county specified in it (especially relevant for international addresses). How can I fix this, please?
User avatar
FPeters
Volunteer
Posts: 20
Joined: Sun Oct 07, 2007 9:28 pm
Location: Hamburg

Re: How to suppress blank lines in mail-merge

Post by FPeters »

That's a tough one.

In theory, the mail merge wizard should take care of that. It has a check box Suppress Lines with just empty fields.
Alas, it didn't work when I tried it. So after some fiddling with conditional fields etc I found the following "solution" to work:

In your letter template, you should have the database fields as placeholders, something like:
<Title>
<First> <Last>
<Road> <No>
<County>
<City> <Zip>
<Country>

You need to create a section around <County> that is conditionally hidden. Assume, that <County> is actually the database field
adressdata.sheet1.county (you can find that out by selecting View > Field Names from the menu), then you need to:
  • Select <County> with the cursor
  • Select Insert > Section from the menu
  • Check the Hide box
  • Enter a condition in the With Condition field. In your case it would be: adressdata.sheet1.county eq ""
HTH
-f
webmink
Posts: 2
Joined: Wed Nov 28, 2007 12:35 pm

Re: How to suppress blank lines in mail-merge

Post by webmink »

Thanks, I'll give that a try.
Post Reply