The table on page 1 has 7 columns and many rows. I have the fields placed in
the 1st row and then at the beginning of the 2nd row I have Next Record in
the first cell and then the fields placed like row 1. The rest of the rows
are all like row 2 with Next Record in cell 1. Then on page 5 of the same
document I have another table with different information - it has 11 columns
and many rows. Again I have row 1 with the data I want placed and then on
the rest of the rows I have Next Record in cell 1 and the same data placed.
The first table works fine - but it doesn't go back to the beginning of the
file for the table on page 5 (this table is blank).
The only way to handle that will be to use two mailmerge maindocuments and
execute the merges to new documents and then to combine them back into one.
The following macro that was written for a person who wanted to create a
document made up by interleaving the pages from two separate documents,
could be modified to handle the combination of the two mail merge documents.
Dim sourcea As Document, sourceb As Document, target As Document, Pages
As Integer, Counter As Integer, targetrange As Range 'targetrange added
Dim evenpage As Range
Set sourcea = Documents.Open(FileName:="...")
sourcea.Repaginate
Pages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
MsgBox Pages
Set sourceb = Documents.Open(FileName:="...")
Set target = Documents.Add
target.PageSetup.LeftMargin = sourcea.PageSetup.LeftMargin
target.PageSetup.RightMargin = sourcea.PageSetup.RightMargin
target.PageSetup.TopMargin = sourcea.PageSetup.TopMargin
target.PageSetup.BottomMargin = sourcea.PageSetup.BottomMargin
target.AcceptAllRevisions
Counter = 0
While Counter < Pages
sourcea.Activate
ActiveDocument.Bookmarks("\page").Range.Copy
Set targetrange = target.Range
targetrange.Start = targetrange.End
targetrange.Paste
ActiveDocument.Bookmarks("\page").Range.Cut
sourceb.Activate 'Assumed to be the document containing the even
pages
Selection.EndKey Unit:=wdStory 'Line of code added to start from the
end of the document
ActiveDocument.Bookmarks("\page").Range.Copy
Set targetrange = target.Range
targetrange.Start = targetrange.End
targetrange.Paste
targetrange.Start = targetrange.End
targetrange.InsertBreak Type:=wdPageBreak
Set evenpage = ActiveDocument.Bookmarks("\page").Range
evenpage.Start = evenpage.Start - 1
evenpage.Delete
Counter = Counter + 1
Wend
sourcea.Close wdDoNotSaveChanges
sourceb.Close wdDoNotSaveChanges

Signature
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
> The table on page 1 has 7 columns and many rows. I have the fields placed
> in
[quoted text clipped - 27 lines]
>> > second
>> > table?