We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Distribute rows evenly in a table

Hi,


I am using Aspose.Words and would like to make the rows in a table all of even height. In a Word document I can right click a table and select “Distribute Rows Evenly” but have not found a way to do this in the code behind. Any help would be appreciated.

Thanks!

Hi Renee,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, I have logged this feature request as WORDSNET-10671 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

As a workaround, please use the following code example. Hope this helps you.


Document doc = new Document(MyDir + "in.docx");

foreach (Row row in doc.GetChildNodes(NodeType.Row, true))

{

row.RowFormat.HeightRule = HeightRule.AtLeast;

row.RowFormat.Height = 72;

}

doc.Save(MyDir + "Out.docx");