none
Applying Mixed Numbering to a Slide in PowerPoint RRS feed

  • Question

  • Hey folks,

    I'm using something like this to apply a numbered level to a selected paragraph on a PowerPoint slide

    Public Sub InsertNumberedLevel2()
    With ActiveWindow.Selection.TextRange
        With .ParagraphFormat
            .Alignment = 1
            .Bullet = -1
            .Bullet.Character = 8226
            .Bullet.Style = 3
            .Bullet.Type = 2
            .HangingPunctuation = -1
            .SpaceAfter = 0
            .SpaceBefore = 12
            .WordWrap = -1
        End With
        With .Font
            .Bold = 0
            .Color = 4341825
            .Italic = 0
            .Name = Arial
            .Size = 28
            .Underline = 0
        End With
            .IndentLevel = 1
        End With
    ChangeIndents 1, 0, 40
    End Sub

    This works well for unmixed hierarchies, but I'm running into trouble when I need mixed numbering. Something like:

    I can't figure out how to get level 2 to switch to "a." I figure it's some combination of .bullet properties but I haven't found the magic combination. Any thoughts?

    Thanks in advance.

    Tuesday, July 15, 2014 1:10 PM

Answers

  • Hi,

    In fact, the difference between level1 and level2 are the IndentLevel Property. So you could use the IndentLevel property to distinguish different level of paragraph.

    Here is a sample to apply number for all level 1 paragraphs for your reference. You could get all level index and then loop these level index to apply number for the matched paragraphs. In this way, it could apply number for all levels one by one.

    Public Sub InsertNumberedLeve()
    
    With ActiveWindow.Selection.TextRange
        For i = 1 To .Paragraphs.Count
            If .Paragraphs(i).IndentLevel = 1 Then
            With .Paragraphs(i).ParagraphFormat
                .Alignment = 1
                .Bullet = -1
                .Bullet.Character = 8226
                .Bullet.Style = 3
                .Bullet.Type = 2
                .HangingPunctuation = -1
                .SpaceAfter = 0
                .SpaceBefore = 12
                .WordWrap = -1
            End With
            End If
        Next
    
    End With
    
    End Sub


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by RexCelestis Wednesday, July 16, 2014 12:14 PM
    Wednesday, July 16, 2014 7:20 AM
    Moderator

All replies

  • Hi,

    In fact, the difference between level1 and level2 are the IndentLevel Property. So you could use the IndentLevel property to distinguish different level of paragraph.

    Here is a sample to apply number for all level 1 paragraphs for your reference. You could get all level index and then loop these level index to apply number for the matched paragraphs. In this way, it could apply number for all levels one by one.

    Public Sub InsertNumberedLeve()
    
    With ActiveWindow.Selection.TextRange
        For i = 1 To .Paragraphs.Count
            If .Paragraphs(i).IndentLevel = 1 Then
            With .Paragraphs(i).ParagraphFormat
                .Alignment = 1
                .Bullet = -1
                .Bullet.Character = 8226
                .Bullet.Style = 3
                .Bullet.Type = 2
                .HangingPunctuation = -1
                .SpaceAfter = 0
                .SpaceBefore = 12
                .WordWrap = -1
            End With
            End If
        Next
    
    End With
    
    End Sub


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by RexCelestis Wednesday, July 16, 2014 12:14 PM
    Wednesday, July 16, 2014 7:20 AM
    Moderator
  • Many thanks!
    Wednesday, July 16, 2014 12:15 PM