We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to delete the last page in word if its blank

Hi there ,

I have a quick question .

How to figure out if the .doc file has a blank last page and if the blank page exists how to delete that specific last page and save the doc file .

I have uploaded a sample copy for your reference .

Thanks in advance .


Hi Anil,

Thanks for your inquiry. In this particular case, you can simply remove last section as follows:

Document doc = new Document(MyDir + @"1‚ô£Template+Highlevel+Overview+Print+to+PDF.doc");
doc.Save(MyDir + @"15.8.0.doc");

Best regards,