Word Automation

  • Thread starter Thread starter Bill Cooter
  • Start date Start date
B

Bill Cooter

I am attempting to insert an existing document into another existing
document. When I insert the section break where I want the file insertion to
take place, no matter what type of section break I use;
wdSectionBreakContinuous; wdSectionBreakOddPage; wdSectionBreakEvenPage; or
wdSectionBreakNextPage, incidently, the one that I want, it always results
in a continuous break.

Can anyone shed light on this item?

Thanks in advance,
 
Thanks for the response, Tamir. It works great for all breaks other than
Section breaks. It's only when using a Next, Odd, or Even Section Break that
the problem exists. I have also tried using the integer values for the
constants (2,3,4,5), but to no avail.

Bill
 
This works fine for me

object oEndOfDoc = "\\endofdoc";
wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
object oPageBreak = Word.WdBreakType.wdPageBreak; //any types
wrdRng.InsertBreak(ref oPageBreak);
 
Back
Top