Forked from PiiXiieeS/Insert a progress bar to Powerpoint presentation .md
Last active
June 24, 2018 19:34
-
-
Save runxel/31a3f98da96bacf3aa2b4b8cebffb519 to your computer and use it in GitHub Desktop.
Revisions
-
runxel revised this gist
Jun 24, 2018 . 1 changed file with 44 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,49 +1,60 @@ ## Intro To view the progress of a Powerpoint presentation, a progress bar can be displayed at the **top** of the slide show. ## How to proceed Once the slideshow is complete, go to **View > Macro** and create a new macro. In the VBS editor copy this text in the blank page: ```vbs '' Add progress bar only to all non-hidden pages Sub AddProgressBar() On Error Resume Next With ActivePresentation n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("leftBar").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then '' Progressbar in red Set sliderPro = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, 0, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 6) With sliderPro .Fill.ForeColor.RGB = RGB(124, 0, 0) .Line.Visible = msoFalse .Name = "progressBar" End With '' Bar whats left (total) in light grey Set sliderLeft = .Slides(i).Shapes.AddShape(msoShapeRectangle, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 0, (.PageSetup.SlideWidth - ((i - n) * .PageSetup.SlideWidth / (.Slides.Count - j))), 6) With sliderLeft .Fill.ForeColor.RGB = RGB(236, 240, 241) .Line.Visible = msoFalse .Name = "leftBar" End With Else n = n + 1 End If Next i: End With End Sub ``` Then go to **File > Close > Return to Microsoft PowerPoint** You can now select *AddProcessBar* and press *Execute* ### How remove the progress bar? To remove the progress bar make we can add the following function: ```vbs '' Macro to remove the progress bar from all the slides Sub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("leftBar").Delete Next i: End With End Sub ``` -
runxel revised this gist
Jun 24, 2018 . 2 changed files with 38 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ To view the progress of a Powerpoint presentation, a progress bar can be display Once the slideshow is complete, go to **Tools > Macro > Visual Basic Editor**. In the new window, select **Insert > Module** and copy this text in the blank page: ```vbs Sub AddProgressBar() On Error Resume Next With ActivePresentation This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,34 +1,44 @@ '' Add progress bar only to all non-hidden pages Sub AddProgressBar() On Error Resume Next With ActivePresentation n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("leftBar").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then '' Progressbar in red Set sliderPro = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, 0, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 6) With sliderPro .Fill.ForeColor.RGB = RGB(124, 0, 0) .Line.Visible = msoFalse .Name = "progressBar" End With '' Bar whats left (total) in light grey Set sliderLeft = .Slides(i).Shapes.AddShape(msoShapeRectangle, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 0, (.PageSetup.SlideWidth - ((i - n) * .PageSetup.SlideWidth / (.Slides.Count - j))), 6) With sliderLeft .Fill.ForeColor.RGB = RGB(236, 240, 241) .Line.Visible = msoFalse .Name = "leftBar" End With Else n = n + 1 End If Next i: End With End Sub '' Macro to remove the progress bar from all the slides Sub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("leftBar").Delete Next i: End With End Sub -
runxel revised this gist
Jun 24, 2018 . 2 changed files with 0 additions and 45 deletions.There are no files selected for viewing
File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,45 +0,0 @@ -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show. ## How to proceed Once the slideshow is complete, go to **Tools > Macro > Visual Basic Editor**. In the new window, select **Insert > Module** and copy this text in the blank page: ``` Sub AddProgressBar() On Error Resume Next @@ -30,9 +30,9 @@ Sub AddProgressBar() End With End Sub ``` Then go to **File > Close > Return to Microsoft PowerPoint** In the displayed page of Microsoft Powerpoint, go to: **Tools > Macro > Macros**, then select *AddProcessBar* and press *Execute* ### How remove the progress bar? To remove the progress bar make we can add the following function: -
PiiXiieeS revised this gist
Oct 27, 2013 . 2 changed files with 16 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,13 +9,23 @@ In the new window, select Insert > Module and copy this text in the blank page: Sub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Else n = n + 1 End If Next i: End With End Sub This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Sub AddProgressBar() Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("pageNumber").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider -
PiiXiieeS revised this gist
Oct 27, 2013 . 2 changed files with 45 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ '' Add progress bar and page numbers to all non-hidden pages Sub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("pageNumber").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Set pageNumber = .Slides(i).Shapes.AddTextbox(msoTextOrientationHorizontal, ((i - n) * .PageSetup.SlideWidth / (.Slides.Count - j)) - 40, .PageSetup.SlideHeight - 15, 100, 10) With pageNumber .TextFrame.TextRange.Text = Str(i - n) & "/" & Str(ActivePresentation.Slides.Count - j) With .TextFrame.TextRange.Font .Bold = msoFalse .Size = 10 End With .Name = "pageNumber" End With Else n = n + 1 End If Next i: End With End Sub '' Macro to remove the progress bar from all the slides Sub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("pageNumber").Delete Next i: End With End Sub This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ '' Add progress bar and page numbers to all non-hidden pagesSub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("pageNumber").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Set pageNumber = .Slides(i).Shapes.AddTextbox(msoTextOrientationHorizontal, ((i - n) * .PageSetup.SlideWidth / (.Slides.Count - j)) - 40, .PageSetup.SlideHeight - 15, 100, 10) With pageNumber .TextFrame.TextRange.Text = Str(i - n) & "/" & Str(ActivePresentation.Slides.Count - j) With .TextFrame.TextRange.Font .Bold = msoFalse .Size = 10 End With .Name = "pageNumber" End With Else n = n + 1 End If Next i: End WithEnd Sub'' Macro to remove the progress bar from all the slidesSub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete .Slides(i).Shapes("pageNumber").Delete Next i: End WithEnd Sub -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Sub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete '' .Slides(i).Shapes("pageNumber").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With '' Set pageNumber = .Slides(i).Shapes.AddTextbox(msoTextOrientationHorizontal, ((i - n) * .PageSetup.SlideWidth / (.Slides.Count - j)) - 40, .PageSetup.SlideHeight - 15, 100, 10) '' With pageNumber '' .TextFrame.TextRange.Text = Str(i - n) & "/" & Str(ActivePresentation.Slides.Count - j) '' With .TextFrame.TextRange.Font '' .Bold = msoFalse '' .Size = 10 '' End With '' .Name = "pageNumber" '' End With Else n = n + 1 End If Next i: End WithEnd Sub -
PiiXiieeS revised this gist
Oct 27, 2013 . 2 changed files with 49 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,18 +6,18 @@ Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: ``` Sub AddProgressBar() On Error Resume Next With ActivePresentation For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, .PageSetup.SlideHeight - 12, (i) * .PageSetup.SlideWidth / (.Slides.Count), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Next i: End With End Sub ``` Then go to File > Close > Return to Microsoft PowerPoint @@ -31,12 +31,9 @@ To remove the progress bar make we can add the following function: Sub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete Next i: End With End Sub ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,34 @@ '' Add progress bar only to all non-hidden pages Sub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Else n = n + 1 End If Next i: End With End Sub '' Macro to remove the progress bar from all the slides Sub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete Next i: End With End Sub -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1 @@ '' Add progress bar only to all non-hidden pagesSub AddProgressBar() On Error Resume Next With ActivePresentation sHeight = .PageSetup.SlideHeight - 12 n = 0 j = 0 For i = 1 To .Slides.Count If .Slides(i).SlideShowTransition.Hidden Then j = j + 1 Next i: For i = 2 To .Slides.Count .Slides(i).Shapes("progressBar").Delete If .Slides(i).SlideShowTransition.Hidden = msoFalse Then Set slider = .Slides(i).Shapes.AddShape(msoShapeRectangle, 0, sHeight, (i - n) * .PageSetup.SlideWidth / (.Slides.Count - j), 12) With slider .Fill.ForeColor.RGB = ActivePresentation.SlideMaster.ColorScheme.Colors(ppFill).RGB .Name = "progressBar" End With Else n = n + 1 End If Next i: End WithEnd Sub'' Macro to remove the progress bar from all the slidesSub RemoveProgressBar() On Error Resume Next With ActivePresentation For i = 1 To .Slides.Count .Slides(i).Shapes("progressBar").Delete Next i: End WithEnd Sub -
PiiXiieeS renamed this gist
Oct 27, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ To view the progress of a Powerpoint presentation, a progress bar can be display Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: ``` Sub AddProgressBar() On Error Resume Next With ActivePresentation -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ To view the progress of a Powerpoint presentation, a progress bar can be display Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: ```vbscript Sub AddProgressBar() On Error Resume Next With ActivePresentation -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ To view the progress of a Powerpoint presentation, a progress bar can be display Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: ```javascript Sub AddProgressBar() On Error Resume Next With ActivePresentation -
PiiXiieeS revised this gist
Oct 27, 2013 . 1 changed file with 21 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ To view the progress of a Powerpoint presentation, a progress bar can be display Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: ``` Sub AddProgressBar() On Error Resume Next With ActivePresentation @@ -18,7 +18,25 @@ In the new window, select Insert > Module and copy this text in the blank page: s.Name = "PB" Next X: End With End Sub ``` Then go to File > Close > Return to Microsoft PowerPoint In the displayed page of Microsoft Powerpoint, go to: Tools > Macro > Macros, then select AddProcessBar and press Execute ### How remove the progress bar? To remove the progress bar make we can add the following function: ``` Sub RemoveProgressBar() 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, 0, 0, 0) s.Fill.ForeColor.RGB = RGB(127, 0, 0) s.Name = "PB" Next X: End With End Sub ``` -
PiiXiieeS revised this gist
Oct 27, 2013 . No changes.There are no files selected for viewing
-
PiiXiieeS revised this gist
Oct 27, 2013 . 2 changed files with 50 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,26 @@ 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(127, 0, 0) s.Name = "PB" Next X: End With End Sub Sub RemoveProgressBar() 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, 0, 0, 0) s.Fill.ForeColor.RGB = RGB(127, 0, 0) s.Name = "PB" Next X: End With End Sub This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ ## Intro To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show. ## How to proceed Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor. In the new window, select Insert > Module and copy this text in the blank page: 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(127, 0, 0) s.Name = "PB" Next X: End With End Sub Then go to File > Close > Return to Microsoft PowerPoint In the displayed page of Microsoft Powerpoint, go to: Tools > Macro > Macros, then select AddProcessBar and press Execute -
PiiXiieeS created this gist
Oct 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ 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(127, 0, 0) s.Name = "PB" Next X: End WithEnd SubSub RemoveProgressBar() 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, 0, 0, 0) s.Fill.ForeColor.RGB = RGB(127, 0, 0) s.Name = "PB" Next X: End WithEnd Sub