• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding A Progress Bar

Guest
Aug 17, 2007 Aug 17, 2007

Copy link to clipboard

Copied

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
TOPICS
Presenter

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 22, 2007 Aug 22, 2007

Copy link to clipboard

Copied

Wow thanks, but where do I insert this code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

No problem: Open up a new powerpoint presentation, open the visual basic editor (alt+F11), add a new module (from the left hand panel of the editor), and paste the code in. Then, go back to powerpoint, right click on an empty section of the toolbar and pick "customize". When you scroll down to the macro section (in the left window) you'll see one named "addProgressBar" - drag this to your toolbar. Now save & close the powerpoint - your macro is ready to go!


v/r

Marc B

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2007 Sep 13, 2007

Copy link to clipboard

Copied

^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 02, 2007 Oct 02, 2007

Copy link to clipboard

Copied

LATEST
^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources