View Single Post
  #6   Report Post  
Posted to microsoft.public.word.pagelayout
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail merge into columns with variable length data?

You need to use an If...Then...Else field construction so that your set up
in the catalog or directory mail merge main document looks like

{ MERGEFIELD Surname } { MERGEFIELD HisName } [CR]
{ IF { MERGEFIELD Cell } "" "{ MERGEFIELD Tel } [CR]
{ MERGEFIELD Cell }" "{ MERGEFIELD Tel }" }

and so on for you other fields that may or may not contain data. You do not
need a Next Record field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Nigel Molesworth" wrote in message
...
On Mon, 21 Jan 2008 09:03:33 +1000, "Doug Robbins - Word MVP"
wrote:

Sounds like you are trying to perform a "multiple items per condition
(=key
field)" mailmerge which Word does not really have the ability to do:


Not really, I'm just limiting the output to the non-bland fields. I think
that aspect may be sorted, so I'll ignore it for now.

My main problem is getting more than one *record* to be processed. If I
was
doing labels, it's easy: I'd just put the following in each table cell:

Surname: HisName [CR]
Tel [CR]
Next Record

But here the problem if different. I don't know how many records I will
have
in a given column (or on a given page) because the data in the records is
not all the same length (e.g. some don't have cell phone numbers).

It is, as you say, a directory. I'm trying to replicate the phone book!