PowerPoint shape text alignment

  • Thread starter Thread starter nets-rac
  • Start date Start date
N

nets-rac

Hi,

I use c# to automate powerpoint. I created a new shape with

PowerPoint.Shape shape =
slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal,
left, top, width, height);
shape.TextFrame.TextRange.Text = text;

Now I want the text to be right-aligned but I can't find a solution!

I tried to set the anfcor

shape.TextFrame.VerticalAnchor = MsoVerticalAnchor.msoAnchorMiddle;
shape.TextFrame.HorizontalAnchor = MsoHorizontalAnchor.msoAnchorCenter;

but this is not what I'm looking for.
Isn't it possible to set the alignment of a text in a text box or how
can I resolve this?

Thanks!
 
Back
Top