Table width issue

Hi team,

Please find attached document. Consider this is my input document.
PAP_RS43733_GLB202302016_20230328145056.docx (104.8 KB)

  1. How to fit the table value in the word if I have long column value. Due to this long text other text alignments of saction is also coming out of word document.

For example: Go to 8.13 Processing Risk saction. -> please delete table after “Inherent Risk Assessment & Control Assessment” Heading. -> see the deference.

or

Go to 8.13 Processing Risk saction. ->Replace the value of each column to “kk” of table in “Inherent Risk Assessment & Control Assessment” Heading. -> see the deference.
image.png (49.4 KB)

Issue: How to fit table inside the word page if I have long text

@rs43733 you can configure the tables to automatically fit to the page width:

Document doc = new Document(@"C:\Temp\input.docx");

var tables = doc.GetChildNodes(NodeType.Table, true);
foreach(Table table in tables)
{
    table.AutoFit(AutoFitBehavior.AutoFitToWindow);
}

doc.Save(@"C:\Temp\output.docx");