PPT 2007 VBA question

  • Thread starter Thread starter Steve Rindsberg
  • Start date Start date
S

Steve Rindsberg

Has anybody had any luck capturing properties new to text in 2007?

Per-paragraph tab settings, for example.
 
John Wilson said:
I'm not sure what you need Steve. I can add per paragraph indents and tabs to
a text box do you mean something more than that?

No, that's about it ... iterate through the collection, read them, add them.
That's about it.

No problem getting the textframe's ruler.tabs settings in earlier versions but
I'm not getting anywhere with it in 2007.
 
Not sure that this is what you mean:

Sub perpara()
With ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange
With .Paragraphs(1).ParagraphFormat
..FirstLineIndent = 12
..TabStops.Add msoTabStopLeft, 24
End With
With .Paragraphs(2).ParagraphFormat
..FirstLineIndent = 36
..TabStops.Add msoTabStopLeft, 48
..TabStops.Add msoTabStopLeft, 60
End With
End With
End Sub
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
John Wilson said:
Not sure that this is what you mean:

Sub perpara()
With ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange
With .Paragraphs(1).ParagraphFormat
..FirstLineIndent = 12
..TabStops.Add msoTabStopLeft, 24
End With
With .Paragraphs(2).ParagraphFormat
..FirstLineIndent = 36
..TabStops.Add msoTabStopLeft, 48
..TabStops.Add msoTabStopLeft, 60
End With
End With
End Sub

Brilliant, John! THANK you.

I think I've danced around with every wrong route to this imaginable in the
last couple of days. This nails it. And with a slight variation:

Sub ShowMeTabs()

Dim X As Long
Dim lTabCount As Long

With ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange
For X = 1 To .Paragraphs.Count
Debug.Print X
With .Paragraphs(X).ParagraphFormat
For lTabCount = 1 To .TabStops.Count
Debug.Print .TabStops(lTabCount).Position
Next ' Tab
Debug.Print "Level:" & .IndentLevel _
& " Position:" & .LeftIndent 'etc
End With ' .Paragraphs(x)
Next ' paragraph
End With

End Sub
 
It's not turning 21 that shrinks your brain John, it's *celebrating* turning
21... ;-)

Lucy
 
John Wilson said:
Just in time Steve - 10 days to THAT birthday which I'm sure will shrink my
brain! ;0)

40?

*AGAIN????*

Look at it this way ... keep at it long enough and eventually our age and IQ
will meet.
 
Back
Top