Free Support Forum -

Right justify text in a table cell

I am creating a Table in Aspose.Words and need to right justify the contents of cells containing currency values.

I can only see options to alight text left to right using the .CellFormat.Orientation = TextOrientation.Horizontal control.

Many Thanks in Advance

Kevin Fisher

Hello Kevin,

There was a similar question several hours ago Smile [:)] So, to align cell contents horizontally, use the ParagraphFormat.Alignment property. This is how Microsoft Word works too. To align the whole contents of the cell you might need to loop over all paragraphs in the cell and set this property on each paragraph as appropriate.