Reply
 
Thread Tools Display Modes
  #1   Report Post  
Kenneth
 
Posts: n/a
Default Merge data into a table...?


Howdy,

I use mail merge frequently in Word 2000 and generally
understand how it operates.

I am experimenting with merging name and address information
into a table, but can't seem to get it working properly.

My data file consists of tab delimited information with a
hard carriage return as the record separator.

I have the fields inserted in the table, but when I run the
merge, all the cells of the table are filled with the same
person's address (as if I were making several mailing labels
for that individual.)

Then, the next page has the same for the next individual.

How can I merge so that the first person's information goes
into the first cell of the table, and the second person's
information goes into the second cell of the table etc.

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #2   Report Post  
Kenneth
 
Posts: n/a
Default

On Wed, 11 May 2005 13:13:16 -0400, Kenneth
wrote:


Howdy,

I use mail merge frequently in Word 2000 and generally
understand how it operates.

I am experimenting with merging name and address information
into a table, but can't seem to get it working properly.

My data file consists of tab delimited information with a
hard carriage return as the record separator.

I have the fields inserted in the table, but when I run the
merge, all the cells of the table are filled with the same
person's address (as if I were making several mailing labels
for that individual.)

Then, the next page has the same for the next individual.

How can I merge so that the first person's information goes
into the first cell of the table, and the second person's
information goes into the second cell of the table etc.

Sincere thanks,


Hello again,

I now realize that I am not approaching this in the best way
(primarily because the number of entries in each record of
my data vary significantly.)

A better approach would be this:

I have a DOC that consists of a blank table formatted as I
wish.

Then I will write the data file with my database.

After each record, there will be a particular string of
characters, for example: ABABABAB.

I would then like to write a Word macro that would open the
data file, open the DOC with the table, and copy text into
the first cell until it comes to "ABABABAB". At that point,
Word would put text into the second cell until, once again,
it comes to "ABABABAB" and so on.

Is that some thing that I could easily set up as a Word
macro?

Sincere thanks for any help on this,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #3   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

A much easier way to approach this is to use Table | Convert | Text to
Table, specifying that text is separated by tabs (the default). If you need
to preserve the original document, do this on a copy.

After you've done this you can either modify the resulting table to format
it as desired or use the table as a mail merge data source.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Kenneth" wrote in message
...

Howdy,

I use mail merge frequently in Word 2000 and generally
understand how it operates.

I am experimenting with merging name and address information
into a table, but can't seem to get it working properly.

My data file consists of tab delimited information with a
hard carriage return as the record separator.

I have the fields inserted in the table, but when I run the
merge, all the cells of the table are filled with the same
person's address (as if I were making several mailing labels
for that individual.)

Then, the next page has the same for the next individual.

How can I merge so that the first person's information goes
into the first cell of the table, and the second person's
information goes into the second cell of the table etc.

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."


  #4   Report Post  
Kenneth
 
Posts: n/a
Default

On Wed, 11 May 2005 17:34:33 -0500, "Suzanne S. Barnhill"
wrote:

A much easier way to approach this is to use Table | Convert | Text to
Table, specifying that text is separated by tabs (the default). If you need
to preserve the original document, do this on a copy.

After you've done this you can either modify the resulting table to format
it as desired or use the table as a mail merge data source.


Hi Suzanne,

That makes very good sense (and, I never would have thought
of it.)

I will experiment with it shortly, and offer you my thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #5   Report Post  
Kenneth
 
Posts: n/a
Default

On Wed, 11 May 2005 18:52:10 -0400, Kenneth
wrote:

On Wed, 11 May 2005 17:34:33 -0500, "Suzanne S. Barnhill"
wrote:

A much easier way to approach this is to use Table | Convert | Text to
Table, specifying that text is separated by tabs (the default). If you need
to preserve the original document, do this on a copy.

After you've done this you can either modify the resulting table to format
it as desired or use the table as a mail merge data source.


Hi Suzanne,

That makes very good sense (and, I never would have thought
of it.)

I will experiment with it shortly, and offer you my thanks,


Hi again,

Well, I have been experimentin', but with little luck:

I set up my database to write a TXT file with data separated
with a "¯" (ALT 0175) character as the delimiter for the
cells of the Word table.

I then opened a Word DOC, inserted the data file, and it
looked something like this: (where CR is a Carriage Return
character:


CR
CR
Joe Bloe
123 45 Street
Histown NY 44444
W: 212-555-1234
H: 212-555-2222
¯
CR
CR
Sue Kreplach
333 85th Street
Apartment 100000001
Hertown MS 22299
¯
CR
CR
CR
CR
CR
Lawrence Lekvar
W413-555-8888
¯
CR
CR
CR
Joe Lekvar
321 45 Street
Histown NY 44444
W: 212-555-3377
H: 212-555-1111
¯
CR
CR
CR
Bill Kreplach
333 85th Street
Apartment 100000005
Hertown MS 33333
¯
CR
CR
CR
CR
Lorrie Lekvar
W413-555-9999
¯


I select all, and click on Table | Convert Text To Table. I
enter Alt 0175 as the separator character, and it displays
properly as "¯" (without the quotes.)

Then, no matter the number of columns I choose, Word
separates the data properly, but the formatting of the text
is not preserved and a ton on extraneous "White Square"
characters are inserted at the location of every carriage
return.

So, the contents of the first cell that I hoped would be:

Joe Bloe
123 45 Street
Histown NY 44444
W: 212-555-1234
H: 212-555-2222


instead looks something like this (where the "X" is the
"White Square")

XXJoe Bloe 123 45 Street Histown NY 44444 W: 212-555-1234 H:
212-555-2222



With that description, might you have a sense of where I am
going wrong here?

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."


  #6   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

Your original description said that you had tabs between fields and carriage
returns (paragraph breaks) between records. Is there some reason you can't
paste the data into Word in just this format? If you do that, then you
should be able to create a table with a row for each record and a column for
each field just by using Convert Table to Text, with tab as the separator.

Starting from what you have, however, it would appear that you've got a
paragraph break at the end of every line, including blank ones, so the trick
here is to convert to a table using a paragraph break as the separator and
specifying eight columns. This will create a table with an extra column for
all those "¯" characters; you can delete that column. You will use this
table as a mail merge data source. This will get you right where you would
be starting if you had done what I described in the paragraph above. Add a
header row with field names.

Now create a label merge, entering the fields in order, separated by
paragraph breaks, and telling Word to suppress blank lines. For more on this
see these articles:

How to create a Mail merge
http://word.mvps.org/FAQs/MailMerge/...AMailMerge.htm

Creating a mail merge Data Source
http://word.mvps.org/FAQs/MailMerge/...DataSource.htm

Mail merge labels with Word XP
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Kenneth" wrote in message
...
On Wed, 11 May 2005 18:52:10 -0400, Kenneth
wrote:

On Wed, 11 May 2005 17:34:33 -0500, "Suzanne S. Barnhill"
wrote:

A much easier way to approach this is to use Table | Convert | Text to
Table, specifying that text is separated by tabs (the default). If you

need
to preserve the original document, do this on a copy.

After you've done this you can either modify the resulting table to

format
it as desired or use the table as a mail merge data source.


Hi Suzanne,

That makes very good sense (and, I never would have thought
of it.)

I will experiment with it shortly, and offer you my thanks,


Hi again,

Well, I have been experimentin', but with little luck:

I set up my database to write a TXT file with data separated
with a "¯" (ALT 0175) character as the delimiter for the
cells of the Word table.

I then opened a Word DOC, inserted the data file, and it
looked something like this: (where CR is a Carriage Return
character:


CR
CR
Joe Bloe
123 45 Street
Histown NY 44444
W: 212-555-1234
H: 212-555-2222
¯
CR
CR
Sue Kreplach
333 85th Street
Apartment 100000001
Hertown MS 22299
¯
CR
CR
CR
CR
CR
Lawrence Lekvar
W413-555-8888
¯
CR
CR
CR
Joe Lekvar
321 45 Street
Histown NY 44444
W: 212-555-3377
H: 212-555-1111
¯
CR
CR
CR
Bill Kreplach
333 85th Street
Apartment 100000005
Hertown MS 33333
¯
CR
CR
CR
CR
Lorrie Lekvar
W413-555-9999
¯


I select all, and click on Table | Convert Text To Table. I
enter Alt 0175 as the separator character, and it displays
properly as "¯" (without the quotes.)

Then, no matter the number of columns I choose, Word
separates the data properly, but the formatting of the text
is not preserved and a ton on extraneous "White Square"
characters are inserted at the location of every carriage
return.

So, the contents of the first cell that I hoped would be:

Joe Bloe
123 45 Street
Histown NY 44444
W: 212-555-1234
H: 212-555-2222


instead looks something like this (where the "X" is the
"White Square")

XXJoe Bloe 123 45 Street Histown NY 44444 W: 212-555-1234 H:
212-555-2222



With that description, might you have a sense of where I am
going wrong here?

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."


  #7   Report Post  
Kenneth
 
Posts: n/a
Default

On Wed, 11 May 2005 22:18:32 -0500, "Suzanne S. Barnhill"
wrote:

Your original description said that you had tabs between fields and carriage
returns (paragraph breaks) between records. Is there some reason you can't
paste the data into Word in just this format? If you do that, then you
should be able to create a table with a row for each record and a column for
each field just by using Convert Table to Text, with tab as the separator.

Starting from what you have, however, it would appear that you've got a
paragraph break at the end of every line, including blank ones, so the trick
here is to convert to a table using a paragraph break as the separator and
specifying eight columns. This will create a table with an extra column for
all those "¯" characters; you can delete that column. You will use this
table as a mail merge data source. This will get you right where you would
be starting if you had done what I described in the paragraph above. Add a
header row with field names.

Now create a label merge, entering the fields in order, separated by
paragraph breaks, and telling Word to suppress blank lines. For more on this
see these articles:

How to create a Mail merge
http://word.mvps.org/FAQs/MailMerge/...AMailMerge.htm

Creating a mail merge Data Source
http://word.mvps.org/FAQs/MailMerge/...DataSource.htm

Mail merge labels with Word XP
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm


Hi Suzanne,

Indeed, in my most recent experiments, I do have a paragraph
break at the end of every line (including blank lines), and
the "¯" character after each record.

But, that structure is arbitrary. I can easily set it up
with any character after each line, and any character as a
record separator.

That said, I am trying to create a table with two columns
and six rows, and I want each record's data to populate one
cell.

Further, I want the data to populate the cell with the
original structure of the data intact, for example a cell
might contain:

Joe Bloe
1234 5th Street
Histown NY 20202
H: 505-555-4321


So, in essence, I want to have Word start at the top of the
data file and copy line by line (preserving the structure of
those lines) into a cell, until it comes to a Record
Separator. Then, I want Word to repeat, but, putting line by
line into the next cell, and so on.

Can you suggest an approach that would give me that?

Sincere thanks, as before,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #8   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

I have suggested an approach that will give you that: a labels merge. If
your existing data will not serve as a mail merge data source, then you will
have to convert it to something that Word can use as a data source.
Natively, Word uses a table, but it can also use comma-delimited files and
other formats.

Or, starting with your current structure, add a paragraph break as the
record separator. Then use Find and Replace to replace ^p (paragraph break)
with ^l (line break). Then replace ^l^l (two lines breaks) with ^p. This
will give you each record in a single paragraph with line breaks. Then use
Convert Text to Table to create a table, specifying two columns and
"paragraph" as the field separator. This will give you a two-column table.
You can then set the row height to an exact amount to replicate your labels.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Kenneth" wrote in message
...
On Wed, 11 May 2005 22:18:32 -0500, "Suzanne S. Barnhill"
wrote:

Your original description said that you had tabs between fields and

carriage
returns (paragraph breaks) between records. Is there some reason you

can't
paste the data into Word in just this format? If you do that, then you
should be able to create a table with a row for each record and a column

for
each field just by using Convert Table to Text, with tab as the

separator.

Starting from what you have, however, it would appear that you've got a
paragraph break at the end of every line, including blank ones, so the

trick
here is to convert to a table using a paragraph break as the separator

and
specifying eight columns. This will create a table with an extra column

for
all those "¯" characters; you can delete that column. You will use this
table as a mail merge data source. This will get you right where you

would
be starting if you had done what I described in the paragraph above. Add

a
header row with field names.

Now create a label merge, entering the fields in order, separated by
paragraph breaks, and telling Word to suppress blank lines. For more on

this
see these articles:

How to create a Mail merge
http://word.mvps.org/FAQs/MailMerge/...AMailMerge.htm

Creating a mail merge Data Source
http://word.mvps.org/FAQs/MailMerge/...DataSource.htm

Mail merge labels with Word XP
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm


Hi Suzanne,

Indeed, in my most recent experiments, I do have a paragraph
break at the end of every line (including blank lines), and
the "¯" character after each record.

But, that structure is arbitrary. I can easily set it up
with any character after each line, and any character as a
record separator.

That said, I am trying to create a table with two columns
and six rows, and I want each record's data to populate one
cell.

Further, I want the data to populate the cell with the
original structure of the data intact, for example a cell
might contain:

Joe Bloe
1234 5th Street
Histown NY 20202
H: 505-555-4321


So, in essence, I want to have Word start at the top of the
data file and copy line by line (preserving the structure of
those lines) into a cell, until it comes to a Record
Separator. Then, I want Word to repeat, but, putting line by
line into the next cell, and so on.

Can you suggest an approach that would give me that?

Sincere thanks, as before,
--
Kenneth

If you email... Please remove the "SPAMLESS."


  #9   Report Post  
Kenneth
 
Posts: n/a
Default

On Thu, 12 May 2005 08:23:10 -0500, "Suzanne S. Barnhill"
wrote:

I have suggested an approach that will give you that: a labels merge. If
your existing data will not serve as a mail merge data source, then you will
have to convert it to something that Word can use as a data source.
Natively, Word uses a table, but it can also use comma-delimited files and
other formats.

Or, starting with your current structure, add a paragraph break as the
record separator. Then use Find and Replace to replace ^p (paragraph break)
with ^l (line break). Then replace ^l^l (two lines breaks) with ^p. This
will give you each record in a single paragraph with line breaks. Then use
Convert Text to Table to create a table, specifying two columns and
"paragraph" as the field separator. This will give you a two-column table.
You can then set the row height to an exact amount to replicate your labels.


Hi Suzanne,

I thank you for your kind and competent help...

All the best,
--
Kenneth

If you email... Please remove the "SPAMLESS."
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
merge data is removed maryj Mailmerge 2 March 23rd 05 08:03 PM
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM
How do I insert Excel data as a Word table and stay within margins Fritz Tables 1 February 6th 05 08:39 AM
Mail merge error occurs when filtering Excel data source Dave Mailmerge 1 December 2nd 04 10:46 PM
Merge Data Source path Peter Jamieson Mailmerge 0 November 25th 04 07:15 PM


All times are GMT +1. The time now is 08:07 AM.

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"