4 Replies Latest reply on Oct 2, 2007 6:28 AM by asm0d

    Adding A Progress Bar

    asm0d Level 1
      Hi all,

      Here's a quick VBA macro which will automatically add a progress bar to the bottom of your PowerPoint Presentations before you convert them:


      Sub addProgressBar()

      myTotal = ActivePresentation.Slides.Count
      myRange = myTotal - 2
      barSegment = 233.88 / myRange

      For x = 1 To myRange
      ActiveWindow.View.GotoSlide Index:=(x+1)
      mySize = barSegment * x
      drawBar (mySize)
      Next x

      End Sub

      Sub drawBar (mySize)

      ActiveWindow.Selection.SlideRange.Shapes.AddLine (144#, 337#, 342#, 336#).Select
      With ActiveWindow.Selection.ShapeRange
      .Line.Weight = 9#
      .Width = 233.88
      .Left = 11.5
      .Top = 534#
      End With
      ActiveWindow.Selection.Unselect

      ActiveWindow.Selection.SlideRange.Shapes.AddLine (126#, 336#, 366#, 336#).Select
      With ActiveWindow.Selection.ShapeRange
      .Line.ForeColor.RGB = RGB(51,102,255)
      .Line.Weight = 9#
      .Width = mySize
      .Left = 11.5
      .Top = 534#
      End With
      ActiveWindow.Selection.Unselect

      End Sub



      Cheers!

      ~Marc B