Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vertically center a table cell's contents in PowerPoint using VBA?

1,126 views
Skip to first unread message

Bryan...@gmail.com

unread,
Oct 11, 2007, 1:49:31 PM10/11/07
to
I need to vertically center a table cell's contents in Powerpoint
using VBA. I am currently using the line of code below for the
horizontal alignment but I cannot find any property for the vertical
alignment. Please let me know if this is possible. Thanks in
advance.

PPShape.Table.Cell(i,
j).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter

Steve Rindsberg

unread,
Oct 11, 2007, 9:55:41 PM10/11/07
to

Work with the TextFrame's horizontal and vertical anchors, something like this:

with PPShape.Table.Cell(i, j).Shape.TextFrame
.HorizontalAnchor = msoAnchorCenter
.VerticalAnchor = msoAnchorMiddle
End With

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


Bryan...@gmail.com

unread,
Oct 12, 2007, 8:50:59 AM10/12/07
to
Exactly what I needed. Thank you Steve!

0 new messages