Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
Created November 22, 2016 08:22
Show Gist options
  • Select an option

  • Save ryo1kato/8e340b5c1c2cb5c54bfb90443045804f to your computer and use it in GitHub Desktop.

Select an option

Save ryo1kato/8e340b5c1c2cb5c54bfb90443045804f to your computer and use it in GitHub Desktop.
Progress Bar for PowerPoint slides
Sub AddProgressBar()
On Error Resume Next
With ActivePresentation
For X = 1 To .Slides.Count
.Slides(X).Shapes("PB").Delete
Set s = .Slides(X).Shapes.AddShape(msoShapeRectangle, _
0, .PageSetup.SlideHeight - 5, _
X * .PageSetup.SlideWidth / .Slides.Count, 5)
s.Fill.ForeColor.RGB = RGB(127, 0, 0)
s.Fill.BackColor.RGB = RGB(127, 0, 0)
s.Line.ForeColor.RGB = RGB(127, 0, 0)
s.Name = "PB"
Next X:
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment