C# word automation : Inserting page break
I went through many articles in order to insert a page break in word document with C#. Though they seemed to work for others, they did not for me. But I did find a way to insert breaks.
object oEndOfDoc = "\\endofdoc"; object paramNextPage = WdBreakType.wdSectionBreakNextPage; wrdDocument.Bookmarks.get_Item(ref oEndOfDoc).Range.InsertBreak(ref paramNextPage);
WHERE
wrdDocument
- Active word document object of type : Microsoft.Office.Interop.Word.Document
Categories: .NET
