Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default 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   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?

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   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default 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   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?

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   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default 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   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!



  #7   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default Mail merge into columns with variable length data?

On Mon, 21 Jan 2008 13:00:38 +1000, "Doug Robbins - Word MVP"
wrote:

You do not need a Next Record field.


Now I'm confused! I think I may have overcomplicated my question.

Can we skip the issue of possibly blank fields, and discuss how to do a mail
merge into a (3 column) page with the following data, each record to go on a
new line (inserted by the merge master document).


Record 1 | Field 1: "A short bit of text"

Record 2 | Field 1: "This is a long bit of text - Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Cras ultricies sem et nisl. Pellentesque
in erat at justo venenatis convallis. Phasellus imperdiet, risus id vehicula
commodo, nulla leo cursus nisi, eu congue diam lorem a purus."

Record 3 | Field 1: "Another short bit of text"

Record 4 | Field 1: etc ....


With data of a fixed maximum length, fitting into cells in a table (for
example to create labels) there is no problem. You just have Next Record
in each cell. There are a fixed number of records per page, for example 14,
18, or 21, corresponding to the labels.

The problem I'm trying to solve is that the data I'm using is not going into
fixed cells, so I don't know how to "get" the next record, and I don't know
how many records there are per page or per column.

  #8   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Mail merge into columns with variable length data?

It sounds to me as if you need to do a Catalog/Directory-type merge into a
multi-column page. No «Next Record» field is required in this type of merge;
Word gets it automatically.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Nigel Molesworth" wrote in message
...
On Mon, 21 Jan 2008 13:00:38 +1000, "Doug Robbins - Word MVP"
wrote:

You do not need a Next Record field.


Now I'm confused! I think I may have overcomplicated my question.

Can we skip the issue of possibly blank fields, and discuss how to do a
mail
merge into a (3 column) page with the following data, each record to go on
a
new line (inserted by the merge master document).


Record 1 | Field 1: "A short bit of text"

Record 2 | Field 1: "This is a long bit of text - Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Cras ultricies sem et nisl.
Pellentesque
in erat at justo venenatis convallis. Phasellus imperdiet, risus id
vehicula
commodo, nulla leo cursus nisi, eu congue diam lorem a purus."

Record 3 | Field 1: "Another short bit of text"

Record 4 | Field 1: etc ....


With data of a fixed maximum length, fitting into cells in a table (for
example to create labels) there is no problem. You just have Next
Record
in each cell. There are a fixed number of records per page, for example
14,
18, or 21, corresponding to the labels.

The problem I'm trying to solve is that the data I'm using is not going
into
fixed cells, so I don't know how to "get" the next record, and I don't
know
how many records there are per page or per column.



  #9   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default Mail merge into columns with variable length data?

On Mon, 21 Jan 2008 10:37:55 -0600, "Suzanne S. Barnhill"
wrote:

It sounds to me as if you need to do a Catalog/Directory-type merge into a
multi-column page.


I'm using a table to give me control of the exact size, should this work?

No «Next Record» field is required in this type of merge;
Word gets it automatically.


OK, I've just done a test. My only text in the merge document is:

Surname [^l]
Tel [^p]

Is this what you mean? Because this code only inserts the first record in
the database, although I can scroll through them all with the Next Record in
the Preview group on the ribbon (so the source is OK).

  #10   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Mail merge into columns with variable length data?

I believe you need to have an empty paragraph after the paragraph you
entered.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Nigel Molesworth" wrote in message
...
On Mon, 21 Jan 2008 10:37:55 -0600, "Suzanne S. Barnhill"
wrote:

It sounds to me as if you need to do a Catalog/Directory-type merge into a
multi-column page.


I'm using a table to give me control of the exact size, should this work?

No «Next Record» field is required in this type of merge;
Word gets it automatically.


OK, I've just done a test. My only text in the merge document is:

Surname [^l]
Tel [^p]

Is this what you mean? Because this code only inserts the first record in
the database, although I can scroll through them all with the Next Record
in
the Preview group on the ribbon (so the source is OK).






  #11   Report Post  
Posted to microsoft.public.word.pagelayout
Nigel Molesworth[_2_] Nigel Molesworth[_2_] is offline
external usenet poster
 
Posts: 34
Default Mail merge into columns with variable length data?

On Mon, 21 Jan 2008 12:53:17 -0600, "Suzanne S. Barnhill"
wrote:

you need to have an empty paragraph after the paragraph you entered.


Hey, it works! Thanks Suzanne. WYMM?

  #12   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Mail merge into columns with variable length data?

Already taken, thanks. g

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Nigel Molesworth" wrote in message
...
On Mon, 21 Jan 2008 12:53:17 -0600, "Suzanne S. Barnhill"
wrote:

you need to have an empty paragraph after the paragraph you entered.


Hey, it works! Thanks Suzanne. WYMM?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging variable length fields Judy Mailmerge 1 January 9th 07 04:32 AM
Inserting variable images into a mail merge Kamitsukenu Mailmerge 6 January 3rd 07 02:13 PM
insert a variable length List BPace Microsoft Word Help 4 October 26th 06 02:56 PM
Mail Merge with variable lines per page aps Microsoft Word Help 0 September 30th 05 09:00 AM
Variable length text (paragraph) in a cell Robert Tables 4 June 20th 05 09:46 PM


All times are GMT +1. The time now is 02:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"