Hi John, I've tried about 2 hours and several different version of code for something so simple (not for me though!).

I need code please that aligns table text in PowerPoint for selected cells. That also works in for a text box. I know there's tools and button already, but making a ribbon I can't insert the msoNAME for these tools. I need a tool to align text to the top. (I can then guestimate for middle and bottom).

Code I ended up close to it is:

[VBA]
Sub AlignTop()


Dim tbl As Table
Dim iCol As Integer
Dim iRow As Integer
Dim I As Integer
On Error GoTo err


Dim X As Integer
Dim Y As Integer
Dim otbl As Table
Dim B As Long
On Error GoTo err:
Set otbl = ActiveWindow.Selection.ShapeRange(1).Table
otbl.Parent.Height = 0
For X = 1 To otbl.Columns.Count
For Y = 1 To otbl.Rows.Count
With otbl.Cell(Y, X)
.Shape.TextFrame2.VerticalAnchor = msoAnchorTop
End With


End Sub


[/VBA]

Your wisdom is much appreciated, thank you. And take care in these strange times.
Thank you.