|
Hi I need to change the vertical alignment of the cells of a table in Word, using Delphi. I can left and right align, but I can't find how to align top or bottom. I need to bottom align my table.
I have created a table in Word with Delphi like this:
Word: _Application; S: OleVariant; R : OleVariant; Direction, Separator, Format: OleVariant;
//Some code to open file and start Word etc, etc.
//Then I create table like this S := Word.Selection; R := Word.Selection.Range; Direction := wdCollapseEnd; R.Collapse(Direction);
XmlParser.ParseFile; //This just adds strings to R
Separator := ','; Format := wdTableFormatGrid1; R.ConvertToTable(Separator, EmptyParam, EmptyParam, EmptyParam, Format, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
//Left align text in cells R.ParagraphFormat.Alignment := wdAlignParagraphLeft;
Word.Visible := True; //////////////////////////////////////////////////////////////// How to do vertical alignment? I have tried this line of code but it doesn't work, (borrowed from how it is done in Excel). R.ParagraphFormat.VerticalAlignment := wdVAlignCenter;
Anyone have ideas for me?
|