PowerPoint shape text alignment

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top