批量清除PPT动画效果的VBA代码
批量清除PPT动画效果的VBA代码2010-02-05 13:47
功能:清除所打开的幻灯片切换效果及幻灯片里的动画效果。
用法:新建一个空PPT文件,点击菜单工具--宏--VISUAL BASIC编辑器,插入一个用户模块,把下面的代码粘贴到模块里,运行宏RemoveAllTrash。
Dim objDoc As Presentation
For Each objDoc In Application.Presentations
RemoveTrash objDoc
Next objDoc
End Sub
Private Sub RemoveTrash(objDoc As Presentation)
Dim objSlide As Slide
Dim objShape As Shape
Dim objEffect As Effect
Dim I As Long
For Each objSlide In objDoc.Slides
objSlide.SlideShowTransition.EntryEffect = ppEffectNone
If Val(Application.Version) < 10 Then
For Each objShape In objSlide.Shapes
objShape.AnimationSettings.Animate = msoFalse
Next objShape
Else
For I = 1 To objSlide.TimeLine.MainSequence.Count
objSlide.TimeLine.MainSequence(I).Delete
Next I
End If
Next objSlide
End Sub 谢谢分享。收藏了
页:
[1]