Skip to content

Instantly share code, notes, and snippets.

@xshapira
Last active October 15, 2020 17:46
Show Gist options
  • Save xshapira/b891a376458454712d7d1dc4a94d3caa to your computer and use it in GitHub Desktop.
Save xshapira/b891a376458454712d7d1dc4a94d3caa to your computer and use it in GitHub Desktop.
Powerpoint progress bar

A progress bar can be displayed at the BOTTOM of the slide show

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 - 12, _ X * .PageSetup.SlideWidth / .Slides.Count, 12) s.Fill.ForeColor.RGB = RGB(227, 28, 70) s.Name = "PB" Next X: End With End Sub

A progress bar can be displayed at the TOP of the slide show

Sub Presentation_Progress_Marker() On Error Resume Next With ActivePresentation For N = 2 To .Slides.Count .Slides(N).Shapes(“Progress_Marker”).Delete Set S = .Slides(N).Shapes.AddShape(msoShapeRectangle, 0, 0, 0, N * .PageSetup.SlideWidth / .Slides.Count, 10) Call S.Fill.Solid S.Fill.ForeColor.RGB = RGB(227, 28, 70) S.Line.Visible = FalseS.Name = “Progress_Marker” Next N: End With End Sub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment