Free Support Forum - aspose.com

How to remove a page or pages from a Document

I have a template DOCX that has an optional page of content I need to remove if a condition is true. What's the best/easiest way to do this?

Currently the DOCX is opened and several text replacements happen before save. Want to trim the last page before saving if necessary.

Hi Gary,


Thanks for your inquiry. There is no page concept in Microsoft Word documents. Pages are created by Microsoft Word on the fly and unfortunately there is no method you can use to remove a page from document.

Could you please attach your Word document, you want to remove page(s) from, here for testing? Also, please specify what page(s) you’re interested in to remove. I will try to find out some way to achieve this and provide you more information.

Best regards,