Get Started
Documentation

SetVerticalAlign

SetVerticalAlign(sType)

Specify the vertical alignment for text within the current table cell.

Parameters:

Name Type Description
sType "top" | "center" | "bottom"

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oTable = Api.CreateTable(2, 4);
oRow = oTable.GetRow(1);
oRow.SetHeight(30 * 36000);
oCell = oRow.GetCell(0);
oContent = oCell.GetContent();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is just a sample text.");
oContent.Push(oParagraph);
oCell.SetVerticalAlign("bottom");
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oSlide.AddObject(oTable);
builder.SaveFile("pptx", "SetVerticalAlign.pptx");
builder.CloseFile();

Resulting document