Till now I solved most of my problems/questions by myself, simply searching for already existing threads...unfortunately this did not work for my current problem, so I thought I give it a try:
I am new to VBA and just recently started programming some useful marcos to automate/simplify slide development on PowerPoint 2007.
In one of them, I am trying to add shapes to a slide with a predefined bullet list. All works fine, except of getting the indentation of the bullets right. I'm not sure which code to use...
What I want to do is on the one hand define the space between bullet and text and on the other hand set the indentation before the bullet for the different levels of the bullet list.
I would really appreciate your help or any links to threads that adress this problem.
Code developed so far see below:
Sub PhaseWiz1Row2Phases()
Dim sld As Slide
Dim SlideIndex As Integer
Dim row1 As Shape
'###Only apply command to currentlty viewed slide###
'set the index number of the currently viewed slide as the variable "SlideIndex"
SlideIndex = ActiveWindow.View.Slide.SlideIndex
'set sld as the current slide
Set sld = ActivePresentation.Slides(SlideIndex)
'###Add and configure shapes to currently viewed slide###
'add first column to the currently viewed slide
Set row1 = sld.Shapes.AddShape(msoShapeRectangle, _
Left:=35.999, Top:=195.587, Width:=308.971, Height:=120)
'configure column
row1.Fill.Visible = msoFalse
row1.Line.Visible = msoTrue
row1.Line.Weight = 1#
row1.Line.ForeColor.RGB = RGB(0, 40, 104)
'Add and configure text
row1.TextFrame.TextRange.Text = "Headline" _
+ Chr$(CharCode:=13) + "Text" + Chr$(CharCode:=13) + "Text" _
+ Chr$(CharCode:=13) + "Text" + Chr$(CharCode:=13) + "Text"
row1.TextFrame.TextRange.Font.Size = 14
row1.TextFrame.TextRange.Font.Name = "Verdana"
row1.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignLeft
row1.TextFrame.VerticalAnchor = msoAnchorTop
row1.TextFrame.TextRange.Paragraphs(3).IndentLevel = 2
row1.TextFrame.TextRange.Paragraphs(4).IndentLevel = 3
row1.TextFrame.TextRange.Paragraphs(5).IndentLevel = 4
With row1.TextFrame.TextRange.Characters(1, 8)
.Font.Color.RGB = RGB(0, 174, 239)
.Font.Bold = msoTrue
End With
With row1.TextFrame.TextRange.Characters(9, 16)
.Font.Color.RGB = RGB(0, 40, 104)
.Font.Bold = msoFalse
End With
With row1.TextFrame.TextRange.Characters(10, 0)
.ParagraphFormat.Bullet.Character = 8226
.ParagraphFormat.Bullet.RelativeSize = 0.7
End With
With row1.TextFrame.TextRange.Characters(15, 0)
.ParagraphFormat.Bullet.Character = 45
.ParagraphFormat.Bullet.RelativeSize = 1.2
'.Paragraphs(3).IndentLevel = 2
End With
With row1.TextFrame.TextRange.Characters(20, 0)
.ParagraphFormat.Bullet.Character = 43
'.Paragraphs(3).IndentLevel = 2
End With
With row1.TextFrame.TextRange.Characters(25, 0)
.ParagraphFormat.Bullet.Character = 46
End With
End Sub