Iceman
Iceman

Reputation: 3

How to set a cells vertical alignment in a table in PowerPoint with VBA?

Using VBA in PowerPoint I am trying to set a cell (within a table) it's Vertical alignment property. In PowerPoint this property can be accessed via "Layout" (when focus is on the cell), click Cell Margins, click Custom Margins. You'll see Vertical Alignment there.

I have figured out how to change the internal margins:

With objTable.Rows(the_row).Cells(the_col).Shape.TextFrame.MarginLeft = ' value in points.

Thank you

Upvotes: 0

Views: 1691

Answers (1)

Dávid Jenei
Dávid Jenei

Reputation: 73

You can access and change it this way:

objTable.Rows(the_row).Cells(the_col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle

https://learn.microsoft.com/en-us/office/vba/api/powerpoint.textframe.verticalanchor

Upvotes: 0

Related Questions