Justify text at Tab

M

MeSteve

I have a powerpoint with a text box that when entering text if you hit Tab,
the cursur moves to the right margin and typing continues from there right
justified. A single tab is the break between left justified and right
justified. How can I set this property in PPT and VBA? Thanks.

ex.
this is my text<Tab> 11 Sep
this is more text<Tab> 11 Sep
 
J

John Wilson

Maybe something like (assuming textbox is selected):

Sub tabset()
Dim oTxtBox As Shape
Set oTxtBox = ActiveWindow.Selection.ShapeRange(1)
With oTxtBox.TextFrame
..TextRange.ParagraphFormat.Alignment = ppAlignLeft
..Ruler.TabStops.Add ppTabStopRight, (oTxtBox.Width + oTxtBox.Left)
End With
Set oTxtBox = Nothing
End Sub
--
Amazing PPT Hints, Tips and Tutorials

http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
_______________________________

We''re at PPTLive - see you there?
www.pptlive.com
 

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