Indents in Text Boxes

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

How do I programmatically find the different levels of indent in a shape? I
can get to the shape (call it myShape), but I can't seem to find the
different indents. How do I do this? I need to know the two paramaters
that define the left and the indent. I've looked at the ruler commands with
no success.

Thanks,
Barb Reinhardt
 
Hi,

Get the Indent level of the paragraph and then use it to get the first and
left margin from the ruler object.
?Activewindow.Selection.ShapeRange.TextFrame.TextRange.Paragraphs(1).IndentLevel

?Activewindow.Selection.ShapeRange.TextFrame.Ruler.Levels(1).LeftMargin

?Activewindow.Selection.ShapeRange.TextFrame.Ruler.Levels(1).FirstMargin


Regards,
Shyam Pillai

Animation Carbon: http://www.animationcarbon.com
 
That doesn't do it. Any other ideas? (I must not have set this to notify
me when I sent the original message).

Thanks,
Barb Reinhardt
 
This seems to identify the indent levels I need to find

For i = 1 To myShape.TextFrame.TextRange.Paragraphs.Count
With myShape.TextFrame.TextRange
Debug.Print .Paragraphs(i).IndentLevel, .Paragraphs(i).Text
End With
Next i


How do I get to the actual indents here?

Thanks,
Barb Reinhardt
 
Steve,

I actually tried this

TabCount = 0
For Each myLevel In myShape.TextFrame.Ruler.Levels
TabCount = TabCount + 1
Debug.Print mySlide.SlideIndex, myShape.Name, TabCount,
myLevel.FirstMargin, myLevel.LeftMargin
Next myLevel

and got 162 for the first margin and 180 for the second margin throughout.
When I tried to change them, the margins in my presentation did not change.
What am I missing?

Thanks,
Barb Reinhardt
 
You're right. It worked in 2003. This is going to be FUN. I may just
have to have this code remind me to run it in 2003 before I spend any more
time on it. Do you ever get ETA's on when fixes are available? We still
have an issue with SlideNames being changed when a presentation is opened in
2007 and saved as a .ppt. It's been that way for nearly a year.

Thanks,
Barb Reinhardt
 
Steve,

I've finally gotten around to revisiting this. I can only get it to with
in PowerPoint 2003 (as we discussed before). Now I'm wondering if there's
a way to determine the font thats used for each level within the document.
 
Back
Top