So, how do I add a right justified tab formatting to the text frame, so that
the tabs that are embedded in the text between the events and the dates will
result in a left justified event names and right justified event dates.
One additional question. Is there any way (other than creating a table) to
change the background color of every other row of text in the same text
frame? I know I could build multiple textframes that only handle a single
row each, but I'm just wondering
----
Dale
Sub StopThatTab()
Dim oSh As Shape
Dim x As Long
' for demo purposes, we'll use the currently selected
' shape. so be sure to select one. ;-)
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh.TextFrame.Ruler
' Delete any existing tabstops
For x = .TabStops.Count To 1 Step -1
.TabStops(x).Clear
Next
' Now add right tabs at 1, 2 and 4 inches
' Measurements are in points, 72 to the inch
.TabStops.Add ppTabStopRight, 72
.TabStops.Add ppTabStopRight, 144
.TabStops.Add ppTabStopRight, 288
End With
End Sub
> One additional question. Is there any way (other than creating a table) to
> change the background color of every other row of text in the same text
> frame? I know I could build multiple textframes that only handle a single
> row each, but I'm just wondering
You could add rectangles behind every other row of text.
You'd work with the textrange's .Lines or .Paragraphs object, whichever is more
appropriate.
This is nowhere close but it'll get you started. It puts a rectangle around
each line of text. You'll need to use z-order to send the rectangles behind the
text and will probably want to adjust the numbers a bit to account for line
spacing.
Sub Thing()
Dim oSh As Shape
Dim x As Long
Dim oSl As Slide
Set oSh = ActiveWindow.Selection.ShapeRange(1)
Set oSl = ActivePresentation.Slides(1)
With oSh.TextFrame.TextRange
For x = 1 To .Lines.Count
oSl.Shapes.AddShape msoShapeRectangle, _
oSh.Left, .Lines(x).BoundTop, oSh.Width, .Lines(x).BoundHeight
Next
End With
End Sub
==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/
PPTools add-ins for PowerPoint
http://www.pptools.com/
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:VA.000054b...@localhost.com...