I am creating a MS Word document entirely through C# in VS 2008. I am trying to insert a page break, and when the page break is inserted, instead of inserting it and adding a new page at the bottom, it is inserting a break and adding a page at the top. This results in the first page being the last page.
Here is the code for inserting the page break:
start = 0;
end = 0;
Word.Range rngDoc = Range(ref start, ref end);
rngDoc.Collapse(ref CollapseEnd);
rngDoc.InsertBreak(ref pageBreak);
rngDoc.Collapse(ref CollapseEnd);
Also, each page is consumed by a table, if this helps with the diagnostics