C-sharp dynamically deletes a page in word

object Unit = (int) Word.WdUnits.wdCharacter;
object Count = 1;
int aa = wordDoc.Range (ref objStart, ref objEnd) .Delete (ref Unit, ref Count);
I use the above code to delete a page in word. There is no problem in deleting the middle page, but it is the last page. After deletion, the last page becomes a blank page

.
Mar.03,2021

how to get it done? Thank you

Menu