Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Mail merge into columns with variable length data?
I want to merge some data into a document with 3 columns (see my filoFax
question earlier today). Unlike labels, the data is variable length, so I need to find a way of flowing the text with a blank line, see below: Adams: Brian Arkwright: Paul Blackstone: Tom Tel: 01234 45679 Tel: 01234 45679 Mob: 07770 12345 Mob: 07770 12345 Fax: 01234 15643 Austin: Mini Tel: 01234 45679 Alundu: Josh Mob: 07770 12344 Tel: 01234 45676 Mob: 07770 12346 Bateman: David Mob: 07770 12344 .... ... ... I also want to suppress lines with no data, and insert the Tel: or Mob: etc on lines which have data. Any ideas? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Mail merge into columns with variable length data?
Use a Directory, (or Catalog in versions before Word XP) type mail merge
main document with a one row three column table in it and insert the mergefields into the cells of that table. -- 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 ... I want to merge some data into a document with 3 columns (see my filoFax question earlier today). Unlike labels, the data is variable length, so I need to find a way of flowing the text with a blank line, see below: Adams: Brian Arkwright: Paul Blackstone: Tom Tel: 01234 45679 Tel: 01234 45679 Mob: 07770 12345 Mob: 07770 12345 Fax: 01234 15643 Austin: Mini Tel: 01234 45679 Alundu: Josh Mob: 07770 12344 Tel: 01234 45676 Mob: 07770 12346 Bateman: David Mob: 07770 12344 ... ... ... I also want to suppress lines with no data, and insert the Tel: or Mob: etc on lines which have data. Any ideas? |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Mail merge into columns with variable length data?
On Fri, 18 Jan 2008 13:25:10 +1000, "Doug Robbins - Word MVP"
wrote: Use a Directory, (or Catalog in versions before Word XP) type mail merge main document with a one row three column table in it and insert the mergefields into the cells of that table. OK, I'm getting somewhere - I think. The following adds the text "Tel:" and the phone number for records with a phone number, but I can only check this by manually going to the next record in the Preview group on the ribbon. Despite the Next Record it will only insert a single entry, not the whole database. Surname: HisName [CR] {IF {MERGEFIELD TEL}"" "Tel:" ""}Tel [CR] Next Record |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Mail merge into columns with variable length data?
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: See the "Group Multiple items for a single condition" item on fellow MVP Cindy Meister's website at http://homepage.swissonline.ch/cindy...faq1.htm#DBPic Or take a look at the following Knowledge Base Article http://support.microsoft.com/default...b;en-us;211303 or at: http://cornell.veplan.net/article.aspx?&a=3815 -- 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 news On Fri, 18 Jan 2008 13:25:10 +1000, "Doug Robbins - Word MVP" wrote: Use a Directory, (or Catalog in versions before Word XP) type mail merge main document with a one row three column table in it and insert the mergefields into the cells of that table. OK, I'm getting somewhere - I think. The following adds the text "Tel:" and the phone number for records with a phone number, but I can only check this by manually going to the next record in the Preview group on the ribbon. Despite the Next Record it will only insert a single entry, not the whole database. Surname: HisName [CR] {IF {MERGEFIELD TEL}"" "Tel:" ""}Tel [CR] Next Record |
#5
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Mail merge into columns with variable length data?
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! |
#6
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
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! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merging variable length fields | Mailmerge | |||
Inserting variable images into a mail merge | Mailmerge | |||
insert a variable length List | Microsoft Word Help | |||
Mail Merge with variable lines per page | Microsoft Word Help | |||
Variable length text (paragraph) in a cell | Tables |