image
alpha

代码写的好,bug改到老

PPT 添加页码进度条

alpha    2020-09-09 19:23

打开 PPT,按 Alt+F11,打开VBE编辑器,插入——模块,并复制下面的代码,最后单击工具栏的“运行”按钮。
Sub AddProgressBar()
    On Error Resume Next
        With ActivePresentation
              For X = 2 To .Slides.Count '第一页和最后一页不加
              .Slides(X).Shapes("PB").Delete
              Set s = .Slides(X).Shapes.AddShape(msoShapeRectangle, _
              0, .PageSetup.SlideHeight - 5, _
              X * .PageSetup.SlideWidth / .Slides.Count, 5) '条高度
              s.Fill.ForeColor.RGB = RGB(56, 93, 138) '设置颜色
              s.Name = "PB"
              Next X:
        End With
End Sub
 
Last Modified: 2020-11-10 20:26
Views: 3.3K

[[total]] comments

Post your comment
  1. [[item.time]]
    [[item.user.username]] [[item.floor]]Floor
  2. Click to load more...
  3. Post your comment