|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 幻灯片进度条()
颜色1 = Array(vbRed, vbBlack, vbGreen, vbYellow, vbMagenta, vbBlue, vbCyan)
颜色2 = Array(vbBlack, vbGreen, vbYellow, vbMagenta, vbBlue, vbCyan, vbRed)
n = ActivePresentation.Slides.Count
i = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
SlideMaster.Label1.Caption = "当 前" & vbCrLf & IIf(i = n, "结 束", i & "/" & n)
j = i Mod 8 + 1
w = ActivePresentation.PageSetup.SlideWidth - 80
t = ActivePresentation.PageSetup.SlideHeight - 20
'For Each shp In SlideMaster.Shapes
' If shp = .Name = "进度条" Then
' If Not shp Is Nothing Then
With ActivePresentation.SlideMaster.Shapes("进度条")
.Width = w * i / n
.Fill.BackColor.RGB = 颜色1(j)
.TextFrame.TextRange.Text = Format(i / n, "0%")
.Fill.ForeColor.RGB = 颜色2(j)
End With
'Else
' With ActivePresentation.SlideMaster.Shapes.AddShape(1, 72, t - 10, w * i / n, 30)
' .Name = "进度条"
' .Fill.BackColor.RGB = 颜色1(j)
' .TextFrame.TextRange.Text = Format(i / n, "0.0%")
' .Fill.ForeColor.RGB = 颜色2(j)
' End With
'End If
'Next
End Sub
|
评分
-
1
查看全部评分
-
|