How do you manipulate Powerpoint TextRange Indent and Tabulations with VBA ?

J

jm.almeras

Dear VBA experts,

As a powerpoint user, if i put the cursor in a form with textual content,
and if the rulers are displayed, i can do many things in the rulers like
insert a tabulation, redefine indent for the different levels of text

Can such manipulations be programmed with VBA ? If i record a macro, the
macro i end up with is empty

Thank you for your help

Jean-Marie
 
S

Steve Rindsberg

Dear VBA experts,

As a powerpoint user, if i put the cursor in a form with textual content,
and if the rulers are displayed, i can do many things in the rulers like
insert a tabulation, redefine indent for the different levels of text

Can such manipulations be programmed with VBA ? If i record a macro, the
macro i end up with is empty

Which version of PPT are you working with? 2007 is a bit different from
previous versions.

In 2003 and previous, have a play with this. Add a new slide, add some text
to the body text placeholder, leave it selected then try this:

Sub TabsNStuff()

Dim oSh As Shape
Set oSh = ActiveWindow.Selection.ShapeRange(1)

With oSh.TextFrame
With .Ruler
With .Levels(1)
.FirstMargin = 36
.LeftMargin = 72
End With
.TabStops.Add ppTabStopCenter, 33
End With
End With

End Sub
 
J

jm.almeras

Thank you Steve, i am working with 2003, and the code you provide is exactly
what i needed
Cheers
 

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