zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

PowerPoint Progress-Bar Macro

May 31, 2011 by Igor Drobot 1 Comment

When somebody present something, you are sitting and thinking when is it over.
With this little macro you can visualize the slide/presentation progress with a bar in the bottom of each slide.

How to use this macro:
Press ALT+F11 to open Visual Basic editor
Add a new VBA Modul and paste this code below.

Close the editor.
Press ALT+F8 to enable your macro

1
2
3
4
5
6
7
8
9
10
11
12
13
  Sub ProgressBar() 
    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 ProgressBar() 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

Filed Under: Windows Tagged With: PowerPoint, PP2007, Windows

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Comments

  1. Christian says

    November 28, 2013 at 02:25

    Hi – I have this working at present – do you know what the code change would be to alter the left and right positions of the bar, and height and thickness too?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *