Hi
Thanks for your request. Actually there is no “column” concept in the Word table. By Microsoft Word design rows in a table in a Microsoft Word document are completely independent. It means each row can have any number of cells of any width. So you can specify only width of cell. You can use CellFormat.Width to set width of table cell.
Please see the following code example:
// Create Document and DocumentBuilder
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Build table
builder.InsertCell();
builder.Write("first column");
// specify width of cell
builder.CellFormat.Width = 50;
builder.InsertCell();
builder.Write("Second column");
builder.CellFormat.Width = 200;
builder.EndRow();
// note that in the next row you should also specify width of each cell
// Build table
builder.InsertCell();
builder.Write("first column");
// specify width of cell
builder.CellFormat.Width = 50;
builder.InsertCell();
builder.Write("Second column");
builder.CellFormat.Width = 200;
builder.EndRow();
builder.EndTable();
doc.Save(@"Test115\out.doc");
Hope this helps.
Best regards.