D
Derek Hart
Does anybody have VBA code that can show me how to combine documents. I
will be using a consistent set of styles between them. I simply want to
combine them in VBA code. I have tried the following:
With Documents(DocCombine).Content
.Collapse wdCollapseEnd
'.InsertBreak
Type:=wdSectionBreakContinuous
.InsertBreak Type:=wdPageBreak
.FormattedText =
ActiveDocument.Content.FormattedText
End With
Note that the .InsertBreak Type:=wdSectionBreakContinuous line is commented
out because I could not get the section information (such as margins) to
stay unless I put the Section Break in the document. But I am getting
strange results. My continuous section breaks are turning into page break
section breaks. Any better code to do this?
Thank You!
Derek Hart
will be using a consistent set of styles between them. I simply want to
combine them in VBA code. I have tried the following:
With Documents(DocCombine).Content
.Collapse wdCollapseEnd
'.InsertBreak
Type:=wdSectionBreakContinuous
.InsertBreak Type:=wdPageBreak
.FormattedText =
ActiveDocument.Content.FormattedText
End With
Note that the .InsertBreak Type:=wdSectionBreakContinuous line is commented
out because I could not get the section information (such as margins) to
stay unless I put the Section Break in the document. But I am getting
strange results. My continuous section breaks are turning into page break
section breaks. Any better code to do this?
Thank You!
Derek Hart