vba教程ppt版 怎样一次删除PPT中所有
发布网友
发布时间:2022-04-30 12:56
我来回答
共1个回答
热心网友
时间:2022-06-22 09:39
下面这段程序是删除PPT 中所有动画的程序,可以参考一下
代码如下:
Sub removeALL()
Dim I As Integer: Dim J As Integer
Dim oActivePres As Object
Set oActivePres = ActivePresentation
With oActivePres
For I = 1 To .Slides.Count
If Val(Application.Version) 10 Then
For J = 1 To .Slides(I).Shapes.Count
.Slides(I).Shapes(J).AnimationSettings.Animate = msoFalse
Next J
Else
For J = .Slides(I).TimeLine.MainSequence.Count To 1 Step -1
.Slides(I).TimeLine.MainSequence(J).Delete
Next J
End If
Next I
End With
Set oActivePres = Nothing
End Sub