我正在尝试编写宏,以使演示文稿中的所有视频文件都具有相同的播放设置。在Powerpoint的“播放”选项卡的“视频选项”组中,这些是我希望应用于所有视频的设置:
这是我到目前为止编写的代码:
Sub VideoOnClick()
Dim oSl As Slide
Dim oSh As Shape
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If oSh.Type = msoMedia Then
If oSh.MediaType = ppMediaTypeMovie Then
oSh.AnimationSettings.PlaySettings.PlayOnEntry = msoTrue
oSh.AnimationSettings.PlaySettings.PlayOnEntry = msoFalse
oSh.ActionSettings(ppMouseClick).Action = ppActionPlay
oSh.AnimationSettings.PlaySettings.RewindMovie = msoFalse
End If
End If
Next
Next
结束子
此宏有效,但是使用“ oSh.ActionSettings(ppMouseClick).Action = ppActionPlay”方法可防止我单击以暂停视频,因为任何后续单击都将从头开始重新播放视频。有没有办法做到这一点并保持单击以暂停功能?