InvalidCastException that is handled is thrown in a scenario with two tables with no paragraphs in between, a page break before the tables and the user inserts paragraph in the second table. As a result, the user is unable to delete content when the selection includes the table ( the one produced by merging the two tables after the paragraph deletion).