Hi,
then it is getting not more complicated, but tedious.
Like the following, which has a lot of undesirable repetitions.
These could be avoided by creating arrays of documents,
arrays of bookmarks, arrays of ranges. If there are rules,
which range of the primary document goes to where in which
other document, then all you got to do, is put this algorithm
down in code, though easier said than done. Unless so, you have
to write down one after another, which range goes to what document
and where.
I am hoping, the principle will clear and be helpful.
---
Sub test444()
Dim oDcm00 As Document
Dim oDcm01 As Document
Dim oDcm02 As Document
Dim oDcm03 As Document
Dim r1 As Range
Dim r2 As Range
Dim r3 As Range
ActiveDocument.SaveAs "c:\test\test-00.doc"
Set oDcm00 = Documents("test-00.doc")
Set oDcm01 = Documents.Add(Visible:=False)
oDcm01.SaveAs "c:\test\test-01.doc"
Set oDcm02 = Documents.Add(Visible:=False)
oDcm02.SaveAs "c:\test\test-02.doc"
Set oDcm03 = Documents.Add(Visible:=False)
oDcm03.SaveAs "c:\test\test-03.doc"
With oDcm00
Set r1 = .Range
r1.start = .Bookmarks("M1").End
r1.End = .Bookmarks("M2").start
Set r2 = .Range
r2.start = .Bookmarks("M3").End
r2.End = .Bookmarks("M4").start
Set r3 = .Range
r3.start = .Bookmarks("M5").End
r3.End = .Bookmarks("M6").start
End With
oDcm01.Range.Text = r1.Text
oDcm01.Save
oDcm02.Range.Text = r2.Text
oDcm02.Save
oDcm03.Range.Text = r3.Text
oDcm03.Save
oDcm01.Close
oDcm02.Close
oDcm03.Close
Set oDcm01 = Nothing
Set oDcm02 = Nothing
Set oDcm03 = Nothing
End Sub
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/