|
如果你的幻灯片很多,并且,每张都使用了很多的动画效果,那么,想删除动画效果,是比较费力的,这个时候,你应该使用VBA代码来为你删除动画效果。
下面是vba功能代码,实现的功能是:清除所打开的幻灯片切换效果及幻灯片里的动画效果。具体的使用方法可参阅下文。
点击菜单工具→宏→VISUAL BASIC编辑器,打开VBA代码编写窗口,然后,插入一个用户模块,把下面的代码粘贴到模块里,运行宏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
|
|