J
Jimbo1004
I am not able to actually indent bullets as paragraphs when using VBA in
PowerPoint 2007. I am able to select any or all of the paragraphs (bullet
list), but when I try to increase the indentlevel from 1 to 2, the bullet
number changes, but the actual text remains left justified and doesn't move.
If I click on the bullet text and then click on the promote button on the
screen, the text does in fact move to the right as expected. The table that
I built has 2 rows and 2 columns. The cell content are in the second row,
first column. Any ideas? Below is a snippet of my code:
Sub indent()
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide
Set PPApp = GetObject(, "Powerpoint.Application")
Set PPPres = PPApp.ActivePresentation
PPApp.ActiveWindow.ViewType = ppViewSlide
Set PPSlide =
PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRange.SlideIndex)
PPPres.Slides(1).Shapes("Table").Table.Cell(2,
1).Shape.TextFrame.TextRange.Paragraphs(3).Select
With PPPres.Slides(1).Shapes("Table").Table.Cell(2,
1).Shape.TextFrame.TextRange
.Paragraphs(3).IndentLevel = 2
End With
End Sub
In the table, I have 5 bullet items like this:
1. aaaaa
2. bbbbb
3. ccccc
4. ddddd
5. eeeee
After running the above routine, I get the following:
1. aaaaa
2. bbbbb
1. ccccc
3. ddddd
4. eeeee
So I know it is properly selecting the paragraph since the 3rd indent bullet
is now at "1" and the other bullets after the 3 bullet are reordered. What I
would expect to see if the indentlevel property was working correctly is the
following in the table cell:
1. aaaaa
2. bbbbb
1. ccccc
3. ddddd
4. eeeee
Suggestions?
PowerPoint 2007. I am able to select any or all of the paragraphs (bullet
list), but when I try to increase the indentlevel from 1 to 2, the bullet
number changes, but the actual text remains left justified and doesn't move.
If I click on the bullet text and then click on the promote button on the
screen, the text does in fact move to the right as expected. The table that
I built has 2 rows and 2 columns. The cell content are in the second row,
first column. Any ideas? Below is a snippet of my code:
Sub indent()
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide
Set PPApp = GetObject(, "Powerpoint.Application")
Set PPPres = PPApp.ActivePresentation
PPApp.ActiveWindow.ViewType = ppViewSlide
Set PPSlide =
PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRange.SlideIndex)
PPPres.Slides(1).Shapes("Table").Table.Cell(2,
1).Shape.TextFrame.TextRange.Paragraphs(3).Select
With PPPres.Slides(1).Shapes("Table").Table.Cell(2,
1).Shape.TextFrame.TextRange
.Paragraphs(3).IndentLevel = 2
End With
End Sub
In the table, I have 5 bullet items like this:
1. aaaaa
2. bbbbb
3. ccccc
4. ddddd
5. eeeee
After running the above routine, I get the following:
1. aaaaa
2. bbbbb
1. ccccc
3. ddddd
4. eeeee
So I know it is properly selecting the paragraph since the 3rd indent bullet
is now at "1" and the other bullets after the 3 bullet are reordered. What I
would expect to see if the indentlevel property was working correctly is the
following in the table cell:
1. aaaaa
2. bbbbb
1. ccccc
3. ddddd
4. eeeee
Suggestions?