Free Support Forum - aspose.com

CellFormat.Alignment Property?

I noticed that in Word you can set cell alignment for an entire row or an individual cell. Can you add an Alignment property to the CellFormat class?

Thanks.

Also, the RowFormat.Alignment property is not having an effect upon the cells. The alignment is whatever the ParagraphFormat alignment is set to.

Hi,

When you set horizontal alignment for table cells in Word, you actually set alignment for paragraphs they contain. Regarding RowFormat.Alignment - this is actually the alignment for the table, in other words, for all rows that the table consists of.

Let me see if I understand…

RowFormat.Alignment sets the alignment for the entire table, since a table in Word is nothing more than a collection of rows.

To align the contents of each cell, I must use ParagraphFormat.Alignment within each cell. So the hierarchy is really:

Table
|
Row
|
Cell
|
Paragraph

You are correct, see this topic http://www.aspose.com/wiki/default.aspx/Aspose.Word/DocumentObjectModelCompositionDiagrams.html

We are in the process of adding more information to the programmers guide and having some more diagrams there.