I'm able to find the option for the left Indentation but not for right Indentation, is there any way to increase the right indentation as to match my expected width for my table alignment.
- Code: Select all
table.TableFormat.LeftIndent = value;
table.TableFormat.LeftIndent = value;
Document doc = new Document();
doc.LoadFromFile(@"E:\Test\Test\test22.docx");
Section section = doc.Sections[0];
Table table = section.Tables[0] as Table;
Table table1 = section.AddTable(true);
table1.ResetCells(3, 3);
table1.PreferredWidth = table.PreferredWidth;
table1.TableFormat.LeftIndent = table.IndentFromLeft;
doc.SaveToFile("sample.docx", FileFormat.Docx);