-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaddBreak.bas
34 lines (34 loc) · 1.13 KB
/
addBreak.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Attribute VB_Name = "addBreak"
Option Explicit
Sub addAnimationBreaks()
On Error Resume Next
Dim i As Integer, j As Integer, t As Integer, cnt As Integer
Dim v As MsoTriState
t = 1
With ActivePresentation
.SaveAs "backup.pptx", ppSaveAsOpenXMLPresentation
While t <= .Slides.Count
With .Slides(t)
Dim seq As Sequence
cnt = 1
Set seq = .TimeLine.MainSequence
Dim last As Integer
last = seq.Count
For i = seq.Count To 1 Step -1
Dim item As Effect
Set item = seq.item(i)
If seq.item(i).Timing.TriggerType = msoAnimTriggerOnPageClick Then
.Duplicate
cnt = cnt + 1
For j = last To i Step -1
seq.item(j).Shape.Visible = msoFalse
Next
End If
last = i
Next
End With
t = t + cnt
Wend
.SaveAs "export.pdf", ppSaveAsPDF
End With
End Sub