Yes, I think that you are getting in a bit over your head - especially as
you are trying to produce a "multiple items per condition" type report.
Word does not really have the ability to perform a "multiple items per
condition (=key field)" mailmerge.
See the "Multiple items per condition" item under the "Special merges"
section of fellow MVP Cindy Meister's website at
http://homepage.swissonline.ch/cindymeister/MergFram.htm
Or, if you create a Catalog (on in Word XP and later, it's called Directory)
type mailmerge main document with the mergefields in the cells of a one row
table in the mailmerge main document with the keyfield in the first cell in
the row and then execute that merge to a new document and then run the
following macro, it will create separate tables with the records for each
key field in them. With a bit of further development, you may be able to
get it to do what you want.
' Macro to create multiple items per condition in separate tables from a
directory type mailmerge
Dim source As Document, target As Document, scat As Range, tcat As Range
Dim data As Range, stab As Table, ttab As Table
Dim i As Long, j As Long, k As Long, n As Long
Set source = ActiveDocument
Set target = Documents.Add
Set stab = source.Tables(1)
k = stab.Columns.Count
Set ttab = target.Tables.Add(Range:=Selection.Range, numrows:=1,
numcolumns:=k - 1)
Set scat = stab.Cell(1, 1).Range
scat.End = scat.End - 1
ttab.Cell(1, 1).Range = scat
j = ttab.Rows.Count
For i = 1 To stab.Rows.Count
Set tcat = ttab.Cell(j, 1).Range
tcat.End = tcat.End - 1
Set scat = stab.Cell(i, 1).Range
scat.End = scat.End - 1
If scat <> tcat Then
ttab.Rows.Add
j = ttab.Rows.Count
ttab.Cell(j, 1).Range = scat
ttab.Cell(j, 1).Range.Paragraphs(1).PageBreakBefore = True
ttab.Rows.Add
ttab.Cell(j + 1, 1).Range.Paragraphs(1).PageBreakBefore = False
For n = 2 To k
Set data = stab.Cell(i, n).Range
data.End = data.End - 1
ttab.Cell(ttab.Rows.Count, n - 1).Range = data
Next n
Else
ttab.Rows.Add
For n = 2 To k
Set data = stab.Cell(i, n).Range
data.End = data.End - 1
ttab.Cell(ttab.Rows.Count, n - 1).Range = data
Next n
End If
Next i
Now, apart from having scared the bejesus out of you, this is not the sort
of thing for which you can make much use of the macro recorder. You are
going to need to get fairly well acquainted with the Word object model and
the use of Visual Basic.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
>I think I might be in way over my head, so I am just looking for any help
>or
[quoted text clipped - 32 lines]
> record
> macro which is annoying.
HeatherO - 26 Feb 2005 18:59 GMT
Thanks Doug,
The scope of the project has changed yet again. So what I am just going
to try to do is take it in steps. I am not doing a mail merge anymore, what
I am going to have to do is read through the excel file since some clients
might have an english document and others might have a french document
therefore 2 different documents. So I decided to just take all the excel
spreadsheets and whatever information I am pulling from other spreadsheets I
will take and dump into the next columns on the one original spreadsheet.
Then I am going to go through the spreadsheet one row at a time check if the
account is the same and if so just populate the old document's table with the
new stuff, and if not then start a new document and use bookmark's and table
references' like 1,0 to insert the data into the word document. The only
thing I am unsure of is if I want to link all the documents together so they
all can be printed and stored under one file name. I know it does this in
the mail merge but I was just curious if there is a save as and append to the
original document kind of thing for word? Thanks for all your help, I just
really had to sit back and analyze all this stuff, plus I think I will have
to go back to the end user and say what he asks for is impossible. They want
me to then go back and sort through the documents and store them in Last Name
and then account order, I mean it's an excel spreadsheet not a database.
Sorry just venting.
Thanks again
> Yes, I think that you are getting in a bit over your head - especially as
> you are trying to produce a "multiple items per condition" type report.
[quoted text clipped - 99 lines]
> > record
> > macro which is annoying.