質問するログイン新規登録

回答編集履歴

2

修正漏れ

2020/09/30 02:42

投稿

kuma_kuma_
kuma_kuma_

スコア2506

answer CHANGED
@@ -2,27 +2,40 @@
2
2
 
3
3
  > アニメーションの上がる距離
4
4
 
5
- 高さ、幅どっち?サンプル書いておいたから値は調整して下さい。
5
+ ~~高さ、幅どっち?サンプル書いておいたから値は調整して下さい。~~
6
+ 移動の位置という事なので修正しました
7
+ [Effect オブジェクト (PowerPoint)](https://docs.microsoft.com/ja-jp/office/vba/api/powerpoint.effect)
8
+ 移動数値は調整して下さい。
6
9
 
7
10
  ```VBA
8
11
  Sub aniUp()
12
+ Dim eff As Effect
9
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
13
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
10
- shape:=ActivePresentation.Slides(1).Shapes(1), _
14
+ Shape:=ActivePresentation.Slides(1).Shapes(1), _
11
- EffectId:=msoAnimEffectPathUp, _
15
+ EffectId:=msoAnimEffectPathUp)
12
- Left:=0, Top:=10, Width:=0, Height:=100)
16
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
13
- .Timing.Duration = 3
17
+ .FromX = 0
18
+ .FromY = 200
19
+ .ToX = 0
20
+ .ToY = 0
14
- End With
21
+ End With
15
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
22
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
16
- shape:=ActivePresentation.Slides(1).Shapes(2), _
23
+ Shape:=ActivePresentation.Slides(1).Shapes(2), _
17
- EffectId:=msoAnimEffectPathUp, _
24
+ EffectId:=msoAnimEffectPathUp)
18
- Left:=0, Top:=10, Width:=0, Height:=100)
25
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
19
- .Timing.Duration = 3
26
+ .FromX = 0
27
+ .FromY = 200
28
+ .ToX = 0
29
+ .ToY = 0
20
- End With
30
+ End With
21
- With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
31
+ Set eff = sldOne.TimeLine.MainSequence.AddEffect( _
22
- shape:=ActivePresentation.Slides(1).Shapes(3), _
32
+ Shape:=ActivePresentation.Slides(1).Shapes(3), _
23
- EffectId:=msoAnimEffectPathUp, _
33
+ EffectId:=msoAnimEffectPathUp)
24
- Left:=0, Top:=10, Width:=0, Height:=100)
34
+ With eff.Behaviors.Add(msoAnimTypeMotion).MotionEffect
25
- .Timing.Duration = 3
35
+ .FromX = 0
36
+ .FromY = 200
37
+ .ToX = 0
38
+ .ToY = 0
26
- End With
39
+ End With
27
40
  End Sub
28
41
  ```

1

修正漏れ

2020/09/30 02:41

投稿

kuma_kuma_
kuma_kuma_

スコア2506

answer CHANGED
@@ -12,14 +12,14 @@
12
12
  Left:=0, Top:=10, Width:=0, Height:=100)
13
13
  .Timing.Duration = 3
14
14
  End With
15
- With ActivePresentation.Slides(2).TimeLine.MainSequence.AddEffect( _
15
+ With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
16
- shape:=ActivePresentation.Slides(1).Shapes(1), _
16
+ shape:=ActivePresentation.Slides(1).Shapes(2), _
17
17
  EffectId:=msoAnimEffectPathUp, _
18
18
  Left:=0, Top:=10, Width:=0, Height:=100)
19
19
  .Timing.Duration = 3
20
20
  End With
21
- With ActivePresentation.Slides(3).TimeLine.MainSequence.AddEffect( _
21
+ With ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect( _
22
- shape:=ActivePresentation.Slides(1).Shapes(1), _
22
+ shape:=ActivePresentation.Slides(1).Shapes(3), _
23
23
  EffectId:=msoAnimEffectPathUp, _
24
24
  Left:=0, Top:=10, Width:=0, Height:=100)
25
25
  .Timing.Duration = 3