Powerpoint VBA - Move chldnode of Vertical Block List to the left

梦想与她 提交于 2019-12-24 05:47:34

问题


Please check below screenshot & code. It has my questions and code I have written so far (which is failing)

Below is my code:

Private Sub VerticalBlockList()
    Dim oPPT As PowerPoint.Application
    Dim oPres As PowerPoint.Presentation
    Const ppLayoutTitleAndContent As Byte = 32

    Set oPPT = CreateObject("Powerpoint.Application")
    Set oPres = oPPT.Presentations.Add()

    Dim layout As SmartArtLayout
    Set layout = Application.SmartArtLayouts(26)

    With oPres.Slides.Add(oPres.Slides.Count + 1, ppLayoutTitleAndContent)
        With .Shapes.AddSmartArt(layout, 30, 180, 318, 252)
            With .SmartArt
                .Nodes(1).Shapes(1).TextFrame2.TextRange.Text = "Sample-1"
                .Nodes(1).Shapes(2).TextFrame2.TextRange.Text = "Sample-2"

                ' Below statement throws error.
                ' basically I want to move the bullet section to little bit on left so that the bullet points doesn't show up
                ' P.S. there is no way I can remove that bullet in a Vertical Block List

                .Nodes(1).Shapes(2).left = .Nodes(1).Shapes(2).left - 30

            End With
        End With
    End With    
End Sub

回答1:


No need to move the shape, you can just remove the bullets:

        .Nodes(1).Shapes(2).TextFrame2.TextRange.ParagraphFormat.Bullet.Type = msoBulletNone


来源:https://stackoverflow.com/questions/42400785/powerpoint-vba-move-chldnode-of-vertical-block-list-to-the-left

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!