|
Sub test()
Dim ptApp, ptPre, n%
Dim Sld As Slide, Obj As Object
Application.ScreenUpdating = False
Set ptApp = CreateObject("PowerPoint.Application")
Set ptPre = ptApp.Presentations.Open("C:\Users\Administrator\Desktop\演示文稿1.pptx", ReadOnly:=msoFalse)
ptApp.WindowState = ppWindowMinimized
For Each Sld In ptPre.Slides
For Each Obj In Sld.Shapes
Sld.Select
If Obj.Type = msoTextBox Then
Obj.Select
Obj.TextFrame.TextRange.Font.Size = 15
Obj.TextFrame.TextRange.Font.Name = "Microsoft YaHei Light"
Obj.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End If
Next Obj
Next Sld
'ptPre.Save '保存PPT文件
'ptPre.Close '关闭PPT文件
'ptApp.Quit '退出PPT程序
Set ptPre = Nothing
Set ptApp = Nothing
Application.ScreenUpdating = True '关闭刷新
End Sub |
|