|
楼主 |
发表于 2023-2-22 08:42
|
显示全部楼层
本帖最后由 zzpsx 于 2023-2-22 12:06 编辑
请问字体大小好像无法改变?
Dim ocls As New 类1
Sub InitializeApp()
Set ocls.app = Application
MsgBox "已经初始化类1"
End Sub
Sub 添加页眉页脚页码()
Dim sd, s, p, i%
Set sd = ActivePresentation.Slides
For Each s In sd
i = i + 1 'Footer页脚,Header页眉,SlideNumber页码
With s.HeadersFooters.Footer
.Visible = msoTrue
.Text = "第 " & i & " 页 / 共 " & sd.Count & " 页"
End With
For Each p In s.Shapes
If InStr(p.Name, "Footer ") Then '设置格式:颜色
p.Right = 800 '离左边500磅不够自行改
p.TextFrame.TextRange.Font.Size = 64
p.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
x = InStr(p.TextFrame.TextRange.Text, "/")
p.TextFrame.TextRange.Characters(1, x) _
.Font.Color.RGB = RGB(0, 0, 255)
End If
Next
Next
End Sub
|
|