Aligning text in a text frame

K

KDUT

Hi,

I need the vba code that will center align some text in a
text box for me - at the minute I have :

with oPPTShape
.TextFrame.HorizontalAlignment =xlHAlignCenter

And it doesn't work - any ideas please?

Many thanks
KDUT
 
J

Juan Pablo González

Using either

..TextFrame.HorizontalAlignment = xlHAlignCenter

or

..TextFrame.HorizontalAlignment = xlCenter

worked for me. But I'm curious about where do you have this code ? (just
because of the name of that variable, I would assume it's in or from
PowerPoint ?)
 
Top