thanks for your reply,
Do you know why it still doesn’t work for the first table in the document (with 4 lines)? It returns number 3 for that which is not the correct line count.
For example in the attached document, there are 3 tables in which the line counting isn’t correct for the first table.
And If I have several tables in documents, should I call updateTableLayout() for each calculation or once is enough? and this calculation should be done once the document is created or is it possible to run this code during document construction (after each table creation step)?
CodeBlock01.docx.zip (21.5 KB)