Aligning text in a text frame

  • Thread starter Thread starter KDUT
  • Start date Start date
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
 
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 ?)
 

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

Back
Top