Powerpointのコードについて質問です。以下のコードをColipotに教えてもらいました。 Sub InsertImagesAndPlaySounds() Dim i As Integer Dim slide As slide Dim shapeA As Shape Dim shapeB As Shape Dim imagePath As String Dim soundPath As String imagePath ="D:\Flashcards\a\" soundPath = "D:\Flashcards\w\" For i = 1 To 20 Set slide =ActivePresentation.Slides(i) Set shapeA =slide.Shapes("a001") Set shapeB =slide.Shapes("b001") shapeA.Fill.UserPictureimagePath & "a" & Format(i, "000") &".jpg" shapeB.Fill.UserPictureimagePath & "b" & Format(i, "000") &".jpg" shapeA.Height = 14.8 shapeA.Width = 10 shapeA.Rotation = 0 shapeA.LockAspectRatio =msoFalse shapeA.Left = 0 shapeA.Top = 0 shapeB.Height = 4.07 shapeB.Width = 32.16 shapeB.Rotation = 0 shapeB.LockAspectRatio =msoFalse shapeB.Left = 0.94 shapeB.Top = 14.98 slide.TimeLine.MainSequence.AddEffect Shape:=shapeA,effectId:=msoAnimEffectMediaPlay, trigger:=msoAnimTriggerWithPrevious slide.TimeLine.MainSequence.AddEffect Shape:=shapeB,effectId:=msoAnimEffectMediaPlay, trigger:=msoAnimTriggerWithPrevious slide.TimeLine.MainSequence.ConvertToAfterEffect Shape:=shapeB,effectId:=msoAnimEffectMediaPlay, trigger:=msoAnimTriggerAfterPrevious slide.TimeLine.MainSequence.Timing.Duration = 3.5 shapeA.AnimationSettings.PlaySettings.SoundEffect.ImportFromFilesoundPath & "w" & Format(i, "000") &".wav" shapeB.AnimationSettings.PlaySettings.SoundEffect.ImportFromFilesoundPath & "w" & Format(i, "000") &".wav" Next i End Sub このようなコードを教えてもらいましたがコンパイルエラーとなってしまいます。 どう間違っているのか教えていただきたいです。どうぞよろしくお願いいたします。
PowerPoint