VBA-Tabstops

  • Thread starter Thread starter Edward
  • Start date Start date
E

Edward

Hi everybody,
Adding tabstops to a table in PP2003 is a cell by cell process I want to
automate this and I know the code

ActiveWindow.Selection.ShapeRange.Table.Cell(1,
1).Shape.TextFrame.Ruler.TabStops.Add ppTabStopLeft, 72

I can loop through this code for a specific range of cells and add all the
tabs. I want to be able to read the tabstop ( I need to know whats a tabstop
number for a specific cell or even type of tabstop ) is this possible?

I thought maybe I can create a tabstop object and then use it
set tb=ActiveWindow.Selection.ShapeRange.Table.Cell(1,
1).Shape.TextFrame.Ruler.TabStops.Add( ppTabStopLeft, 72)

now somehow assign the tb to a new cell but I couldn't do it.
Any suggestions?
 
I've never used VBA to work with tab stops in cells, but wouldn't

..TabStops(1).Type
..TabStops(1).Position

get you the type and position of tab stop #1. You could loop through the
tab stops (For i = 1 to .TabStops.Count ...) and get whatever
information you need.

If this isn't what you had in mind, I'm not quite sure what you're
asking for.

--David
 
I would like to delete all the tabstops in powerpoint 2010 with VB

Sub clearAllTab()
For SlideNumber = 168 To 169
Set sl = ActivePresentation.Slides(SlideNumber)
For Each sh In sl.Shapes
If sh.HasTextFrame Then
Set myTabStops = sh.TextFrame.Ruler.TabStops
For t = myTabStops.Count To 1 Step -1
myTabStops.Item(t).Clear
Next
End If
Next
Next
End Sub

This works with the slide title textbox but not with main text box. There are bulleted lines there, and the tabstop of each should be deleted somehow. Any idea?
 
Back
Top