-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgressBar.bas
28 lines (23 loc) · 1015 Bytes
/
ProgressBar.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Sub ProgressBar()
On Error Resume Next
With ActivePresentation
Dim objectName As String: objectName = "ProgressBar"
Dim barHeight As Integer: barHeight = 2
Dim offsetVertical As Integer: offsetVertical = 2
Dim barWidth As Integer: barWidth = 0
Dim offsetHorizontal As Integer: offsetHorizontal = 0
Dim barColor As Long: barColor = RGB(255, 0, 0)
For i = 1 To .Slides.Count
.Slides(i).Shapes(objectName).Delete
Set bar = .Slides(i).Shapes.AddShape( _
Type:=msoShapeRectangle, _
Left:=offsetHorizontal, _
Top:=.PageSetup.SlideHeight - offsetVertical, _
Width:=i * (.PageSetup.SlideWidth - barWidth) / .Slides.Count, _
height:=barHeight)
bar.Fill.ForeColor.RGB = barColor
bar.Line.ForeColor.RGB = barColor
bar.Name = objectName
Next i:
End With
End Sub