回答編集履歴

2

修正漏れ

2020/09/30 02:42

投稿

kuma_kuma_
kuma_kuma_

スコア2506

test CHANGED
@@ -6,7 +6,13 @@
6
6
 
7
7
 
8
8
 
9
- 高さ、幅どっち?サンプル書いておいたから値は調整して下さい。
9
+ ~~高さ、幅どっち?サンプル書いておいたから値は調整して下さい。~~
10
+
11
+ 移動の位置という事なので修正しました
12
+
13
+ [Effect オブジェクト (PowerPoint)](https://docs.microsoft.com/ja-jp/office/vba/api/powerpoint.effect)
14
+
15
+ 移動数値は調整して下さい。
10
16
 
11
17
 
12
18
 
@@ -14,41 +20,61 @@
14
20
 
15
21
  Sub aniUp()
16
22
 
17
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
23
+ Dim eff As Effect
18
24
 
19
- shape:=ActivePresentation.Slides(1).Shapes(1), _
25
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
20
26
 
21
- EffectId:=msoAnimEffectPathUp, _
27
+ Shape:=ActivePresentation.Slides(1).Shapes(1), _
22
28
 
23
- Left:=0, Top:=10, Width:=0, Height:=100)
29
+ EffectId:=msoAnimEffectPathUp)
24
30
 
25
- .Timing.Duration = 3
31
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
26
32
 
27
- End With
33
+ .FromX = 0
28
34
 
29
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
35
+ .FromY = 200
30
36
 
31
- shape:=ActivePresentation.Slides(1).Shapes(2), _
37
+ .ToX = 0
32
38
 
33
- EffectId:=msoAnimEffectPathUp, _
39
+ .ToY = 0
34
40
 
35
- Left:=0, Top:=10, Width:=0, Height:=100)
41
+ End With
36
42
 
37
- .Timing.Duration = 3
43
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
38
44
 
39
- End With
45
+ Shape:=ActivePresentation.Slides(1).Shapes(2), _
40
46
 
41
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
47
+ EffectId:=msoAnimEffectPathUp)
42
48
 
43
- shape:=ActivePresentation.Slides(1).Shapes(3), _
49
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
44
50
 
45
- EffectId:=msoAnimEffectPathUp, _
51
+ .FromX = 0
46
52
 
47
- Left:=0, Top:=10, Width:=0, Height:=100)
53
+ .FromY = 200
48
54
 
49
- .Timing.Duration = 3
55
+ .ToX = 0
50
56
 
57
+ .ToY = 0
58
+
51
- End With
59
+ End With
60
+
61
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
62
+
63
+ Shape:=ActivePresentation.Slides(1).Shapes(3), _
64
+
65
+ EffectId:=msoAnimEffectPathUp)
66
+
67
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
68
+
69
+ .FromX = 0
70
+
71
+ .FromY = 200
72
+
73
+ .ToX = 0
74
+
75
+ .ToY = 0
76
+
77
+ End With
52
78
 
53
79
  End Sub
54
80
 

1

修正漏れ

2020/09/30 02:41

投稿

kuma_kuma_
kuma_kuma_

スコア2506

test CHANGED
@@ -26,9 +26,9 @@
26
26
 
27
27
  End With
28
28
 
29
- With ActivePresentation.Slides(2).TimeLine.MainSequence.AddEffect( _
29
+ With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
30
30
 
31
- shape:=ActivePresentation.Slides(1).Shapes(1), _
31
+ shape:=ActivePresentation.Slides(1).Shapes(2), _
32
32
 
33
33
  EffectId:=msoAnimEffectPathUp, _
34
34
 
@@ -38,9 +38,9 @@
38
38
 
39
39
  End With
40
40
 
41
- With ActivePresentation.Slides(3).TimeLine.MainSequence.AddEffect( _
41
+ With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
42
42
 
43
- shape:=ActivePresentation.Slides(1).Shapes(1), _
43
+ shape:=ActivePresentation.Slides(1).Shapes(3), _
44
44
 
45
45
  EffectId:=msoAnimEffectPathUp, _
46
46