我经常使用MS PPT,文件中嵌入了许多视频。我想运行一个宏,以将所选幻灯片中的视频设置为在开始时自动播放。
Sub SetStartAutomatically()
Dim mySld As Slide
Dim myVid As Shape
Dim sldX As Integer
sldX = ActiveWindow.View.Slide.SlideIndex
Set mySld = ActivePresentation.Slides(sldX)
Set myVid = mySld.Shapes(1)
myVid.AnimationSettings.PlaySettings.PlayOnEntry = msoTrue
End Sub
我尝试了上面的代码,但是没有用。
答案 0 :(得分:0)
尝试此操作作为最后一行:
mySld.TimeLine.MainSequence.AddEffect myVid, msoAnimEffectMediaPlay, , msoAnimTriggerWithPrevious