R
rgutter
Is there any way to stop Word 2000 from appending a new page section
break at the end of subdocuments?
The Master Document ends up with continuous section breaks between the
subdocuments, which I can understand. But it actually adds new page
section breaks at the end of the source documents!
It insists on doing so even when I add them as read-only:
Sub CreateMasterDocument(strBaseFileName As String, _
strPath As String, _
intPages As Integer)
Dim oDoc As Document
Dim iPage As Integer
Set oDoc = Documents.Add
oDoc.Activate
ActiveWindow.ActivePane.View.Type = wdMasterView
ChangeFileOpenDirectory strPath
For iPage = 1 To intPages
Selection.Range.Subdocuments.AddFromFile _
Name:=strBaseFileName + "-" + Format(iPage, "0000") _
+ ".doc", ReadOnly:=True
Next iPage
ActiveDocument.SaveAs _
FileName:=strBaseFileName + "-0000.doc", _
FileFormat:=wdFormatDocument
ActiveDocument.Close
Set oDoc = Nothing
End Sub
Any suggestions?
break at the end of subdocuments?
The Master Document ends up with continuous section breaks between the
subdocuments, which I can understand. But it actually adds new page
section breaks at the end of the source documents!
It insists on doing so even when I add them as read-only:
Sub CreateMasterDocument(strBaseFileName As String, _
strPath As String, _
intPages As Integer)
Dim oDoc As Document
Dim iPage As Integer
Set oDoc = Documents.Add
oDoc.Activate
ActiveWindow.ActivePane.View.Type = wdMasterView
ChangeFileOpenDirectory strPath
For iPage = 1 To intPages
Selection.Range.Subdocuments.AddFromFile _
Name:=strBaseFileName + "-" + Format(iPage, "0000") _
+ ".doc", ReadOnly:=True
Next iPage
ActiveDocument.SaveAs _
FileName:=strBaseFileName + "-0000.doc", _
FileFormat:=wdFormatDocument
ActiveDocument.Close
Set oDoc = Nothing
End Sub
Any suggestions?