Skip to content

Instantly share code, notes, and snippets.

@shinyzhu
Created May 18, 2014 01:37
Show Gist options
  • Save shinyzhu/1392699e278136a7cc64 to your computer and use it in GitHub Desktop.
Save shinyzhu/1392699e278136a7cc64 to your computer and use it in GitHub Desktop.
Add a progress bar to each slide bottom of PowerPoint.
Option Explicit
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(0, 145, 137)
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