State the Hierarchy of PowerPoint

  • First define the PowerPoint Application
  • Next define the Presentation which is a Property of Application
  • Next define the Slide which is a Property of Presentation
  •  

    Define the PowerPoint Application

  • Use below mentioned code to define the Powerpoint Presentation
  • Dim PPTApp As PowerPoint.Application
    Set PPTApp = New PowerPoint.Application

     

    Define the PowerPoint Presentation

    Dim PPTPres As PowerPoint.Presentation
    Set PPTPres = PPTApp.Presentations.Add

     

    Define the PowerPoint Slide

    Dim ppts As PowerPoint.Slide
    Set ppts = PPTPres.Slides.Add(SlideNumber, 15)

     

     

    Loop the all shapes which exists in Powerpoint Slide

  • a Powerpoint slide consits of One or more shapes
  •  

    For Shap = 1 To ppts.Shapes.Count
    'Your Action
    Next

     

    Resize the shape in a Slide

    With ppts.Shapes(Shap)
    .Top = 20
    .Height = 35
    .Left = 45
    .Width = 500
    End With

     

    Font Adjustments in a Shape

    With ppts.Shapes(S).TextEffect
    .FontBold = msoTrue
    .FontName = "Calibri"
    .FontSize = 11
    .Alignment = msoTextEffectAlignmentCentered
    End With