Results 1 to 8 of 8

Thread: How to inserte progress DOTS in powerpoint 2012

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,887
    Location
    One possilble initial approach

    Run the macro as design time and it adds 4 markers and fills them in (1,2,3,4,1,2,3,4,1,2,3,4, ....)

    [vba]
    Option Explicit
    Sub AddMarkers()
    Dim oPres As Presentation
    Dim oSlide As Slide
    Dim oShape As Shape
    Dim aBox(0 To 3) As Shape
    Dim i As Long
    Set oPres = ActivePresentation
    For Each oSlide In oPres.Slides
    On Error Resume Next
    oSlide.Shapes("Box0").Delete
    oSlide.Shapes("Box1").Delete
    oSlide.Shapes("Box2").Delete
    oSlide.Shapes("Box3").Delete
    On Error GoTo 0
    Next

    For Each oSlide In oPres.Slides
    For i = 0 To 3
    Set aBox(i) = oSlide.Shapes.AddShape(msoShapeRectangle, 12 * i, 0, 12, 12)
    aBox(i).Name = "Box" & i
    aBox(i).Fill.ForeColor.RGB = RGB(0, 0, 0)
    aBox(i).Line.Weight = 1
    aBox(i).Line.ForeColor.RGB = RGB(255, 255, 255)
    Next i
    Next

    For Each oSlide In oPres.Slides
    i = (oSlide.SlideNumber Mod 4)
    oSlide.Shapes("Box" & i).Fill.ForeColor.RGB = RGB(255, 0, 0)
    Next
    End Sub
    [/vba]

    Pretty crude, but it might help. The attachment has a sample result

    (Remove the .zip part)

    Paul
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •