How can I remove blank page from a Word document using C# codes? RRS feed

  • Question

  • Dear Friends,

    I got a Word Document (see the hyperlink!281&parId=8FFA4A1C66CFCED9!280&app=Word), where there is a blank page in page 10 of 12 (see the screenshot in the URL I have nearly exhausted various methods (e.g., removing a full blank page, deleting the content between two bookmarks, deleting by inputting backspace keys...) to try to delete the empty page, but all failed. 

    Now I would like to provide the source codes ( for your reference. 

    You are also welcome to share your source codes with me if you manage to delete the empty page.

    Thank you.

    Best Regards,


    • Moved by CoolDadTx Wednesday, May 8, 2019 2:11 PM Office related
    Wednesday, May 8, 2019 1:50 PM

All replies

  • Have you tested the method answered in this thread for example ?
    Wednesday, May 8, 2019 2:05 PM
  • The two links you have given do not appear to be accessible.

    Have you checked that the blank page is not caused by a section break? e.g. if the last page of section 1 is 6 and the next section starts with an Even Page break, page 7 will be blank and trying to remove it will probably have unexpected results.

    Peter Jamieson

    Wednesday, May 8, 2019 2:29 PM