包含动画的PPT转为PDF

您所在的位置:网站首页 动画可以打印吗 包含动画的PPT转为PDF

包含动画的PPT转为PDF

2024-07-17 16:50| 来源: 网络整理| 查看: 265

目的:带动画的PPT转化为PDF,PDF的每一页是动画的一个步骤 方法:使用 宏 参考链接:https://www.codercto.com/a/70548.html

具体方法(win、mac均可): 前提:需启用 宏 功能

步骤一

打开 工具-宏-Visual Basic 编辑器,点击 插入-模块,在窗口中粘贴如下代码

Option Explicit Sub AddElements() Dim shp As Shape Dim i As Integer, n As Integer n = ActivePresentation.Slides.Count For i = 1 To n Dim s As Slide Set s = ActivePresentation.Slides(i) s.SlideShowTransition.Hidden = msoTrue Dim max As Integer: max = AnimationElements(s) Dim k As Integer, s2 As Slide For k = 1 To max Set s2 = s.Duplicate(1) s2.Name = "AutoGenerated: " & s2.SlideID s2.SlideShowTransition.Hidden = msoFalse s2.MoveTo ActivePresentation.Slides.Count Dim i2 As Integer, h As Shape Dim Del As New Collection For i2 = s2.Shapes.Count To 1 Step -1 Set h = s2.Shapes(i2) If Not IsVisible(s2, h, k) Then Del.Add h Next Dim j As Integer For j = s.TimeLine.MainSequence.Count To 1 Step -1 s2.TimeLine.MainSequence.Item(1).Delete Next For j = Del.Count To 1 Step -1 Del(j).Delete Del.Remove j Next Next Next End Sub 'is the shape on this slide visible at point this time step (1..n) Function IsVisible(s As Slide, h As Shape, i As Integer) As Boolean 'first search for a start state Dim e As Effect IsVisible = True For Each e In s.TimeLine.MainSequence If e.Shape Is h Then IsVisible = Not (e.Exit = msoFalse) Exit For End If Next 'now run forward animating it Dim n As Integer: n = 1 For Each e In s.TimeLine.MainSequence If e.Timing.TriggerType = msoAnimTriggerOnPageClick Then n = n + 1 If n > i Then Exit For If e.Shape Is h Then IsVisible = (e.Exit = msoFalse) Next End Function 'How many animation steps are there '1 for a slide with no additional elements Function AnimationElements(s As Slide) As Integer AnimationElements = 1 Dim e As Effect For Each e In s.TimeLine.MainSequence If e.Timing.TriggerType = msoAnimTriggerOnPageClick Then AnimationElements = AnimationElements + 1 End If Next End Function Sub RemElements() Dim i As Integer, n As Integer Dim s As Slide n = ActivePresentation.Slides.Count For i = n To 1 Step -1 Set s = ActivePresentation.Slides(i) If s.SlideShowTransition.Hidden = msoTrue Then s.SlideShowTransition.Hidden = msoFalse ElseIf Left$(s.Name, 13) = "AutoGenerated" Then s.Delete End If Next End Sub AddElements为展开ppt中的动画RemElemnts为删除展开的部分 步骤二

在 Powerpoint 的主窗口中选择“工具->宏->宏”,选择“AddElements”,然后点击“运行”即可。 在这里插入图片描述

步骤三

将修改后的PPT另存为PDF



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3