Merging Word doc with 3 data sources

J

JEverhart

I have a Word doc that has a table with 3 columns. The first column has 20
rows, the second 10 rows, and the third 4 rows. Each column needs to pull
information from a separate data source (3 total). How can I do this?

Copy/paste to put all the data sources together is not an option. Too many
to deal with.
Thanks!
 
P

Peter Jamieson

What is/are the data sources?
Copy/paste to put all the data sources together is not an option.

I would suggest it would have to be an option if there are no better
options.
 
P

Peter Jamieson

OK, to /merge/ into a pre-existing table layout with a fixed cell layout
(column 1 with 20 cells, column 2 with 10 cells etc., unless I have
misunderstood?) is difficult because Word wants to fill the cells row by
row, i.e. row1col1, row1col2, row1col3, row2col1 etc. So you would really
have to rearrange your data in that sequence.

In this case it might be easier not to use a merge, but to copy/paste
special|paste link each cell into your table. In fact, if you select the
first cell you want to use in Excel, then edit copy, then edit|paste, paste
link (use a plain text or rtf format) into word, then use Alt-F9 to reveal
the pasted LINK field code in Word. You should be able to copy the LINK
field and modify the workbook/sheet/cell reference for each cell in your
table.

(You'd need Excel on the machine that's going to do the "merge" to do it
that way).
 
J

JEverhart

The merged Word doc will ultimately be 560 pages.
1. Can I then separate it into individual documents (16 pages each) and save
them?
2. Do the Excel files have to be kept in the same folder on the
computer/system in order for the links to work?
 
J

JEverhart

By the way, the data doesn't have to be in table format. I can remove them
from the table and just have the merge occur using TABS to create the 3
columns that are needed.

--
JEverhart


JEverhart said:
The merged Word doc will ultimately be 560 pages.
1. Can I then separate it into individual documents (16 pages each) and save
them?
2. Do the Excel files have to be kept in the same folder on the
computer/system in order for the links to work?
 
P

Peter Jamieson

OK, I think you are attempting a rather different type of merge from the one
I imagined. Maybe you could spell out how your data needs to map into the
final results in a little more detail?

e.g. if you are going to create 35 copies of your 16-page mail merge main
document, then you presumably have another data source that has 35 rows in
it to drive the merge? Is the same data from the same Excel sheets going
into each of the 35 copies, or are you trying to get rows 1-20 from sheet 1
into copy 1, rows 21-40 iinto copy 2, etc.?

It is highly likely that this merge is going to be beyond the
"out-of-the-box" capabilities of Word, but let's see.

(For the "splitter" part, see the material by Graham Mayor and Doug Robbins
at http://www.gmayor.com/individual_merge_letters.htm - I suspect that the
"splitter" code near the bottom is going to be more useful in this case as I
suspect your merge may be too complex for the add-in to be useful)

--
Peter Jamieson
http://tips.pjmsn.me.uk

JEverhart said:
The merged Word doc will ultimately be 560 pages.
1. Can I then separate it into individual documents (16 pages each) and
save
them?
2. Do the Excel files have to be kept in the same folder on the
computer/system in order for the links to work?
 
J

JEverhart

*I have 10,000 cells of data (1 column) in one Excel document, 5000 in
another, and 3000 in another.

*They go into Columns 1 (20 items), 2(10 items), and 3(4 items) in the Word
Document respectively.

*As I mentioned, I can do away with the table in the Word doc

*I need the items in each Excel document to merge into the Word doc.

*The result of this would be a 560 page merged document.

Does that help clear things up a bit?
 
P

Peter Jamieson

In my view the simplest way to do this would be to use an Excel VBA macro to
combine the 3 data sources to create a 34-column table where each row
contains 20 cells from data source 1, 10 cells from data source 2 and 4
cells from data source 3 (although you are going to have 1000 cells left
over from source 3 after populating the first 1000 rows).

Then use that as the data source for a mailmerge where you simply take the
content of each of the 34 cells in your table from the 34 columns in the new
sheet.

If you are stuck on the Excel VBA front, I can try to do something but not
right now. However, if you do go that route, I suggest you write the
34-column table as a table in a Word document (or, e.g., as a set of
tab-delimited rows in a Word document as long as there are no tabs in your
data) unless you know that the resulting Excel sheet would not fall foul of
the problems described in http://tips.pjmsn.me.uk/t0003.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top