Dim ThisPowerPnt As PowerPoint.Application
Dim ThisPresentation As PowerPoint.Presentation
Dim CurrentSlide As PowerPoint.Slide
 'PowerPoint 7 is the first version as an OLE Server.
Set ThisPowerPnt = CreateObject("PowerPoint.Application")
ThisPowerPnt.AppWindow.Visible = TrueSet ThisPresentation = ThisPowerPnt.Presentations.Add( _
    WithWindow:=True _
    )
Set CurrentSlide = ThisPresentation.Slides.Add( _
    Index:=1, _
    Layout:=PowerPoint.SlideLayout.ppLayoutText _
    )
    With CurrentSlide
        'Note: Objects are "SlideObects"
        .Objects(1).Text = "MSDN PowerPoint Programmability"
        .Objects(2).Text = "Sixteen Point Star"
        .Objects.AddShape _
            type:=PowerPoint.ShapeType.ppShapeSixteenPointStar, _
            Left:=4800, _
            Top:=4300, _
            Width:=5000, _
            Height:=5000
        'Units of measurement are in TWIPS (like Visual Basic).
        .Objects(3).GraphicFormat.Fill.PresetTextured _
            PowerPoint.PresetTexture.ppPresetTextureWovenMat
    End With