AAAkash Arul Syncfusion Team November 16, 2022 10:56 AM
From the given code snippet, we have found that you are
created temporary Word document instance and added one section and table into
it. Then tried to copy that table to the text body part using text body
API should select the contents between the paragraphs. But only table is
present and no paragraphs in that text body. So, it causes the reported
exception issue in TextBodySelection API. If text body contains only table,
TextBodySelection API is not suitable for your requirement.
From the given details, we understood that your requirement is to replace the
text with a table in the Word document.
To achieve your requirement, we suggest you to add the table in the text body
part directly without using text body selection and then replace the text with
that text body part using Replace