通过 VBA 将音频剪辑添加到跨多张幻灯片的 PowerPoint 演示文稿
要播放以形状形式插入演示文稿中多张幻灯片的音频剪辑,效果选项卡中的播放声音对话框中有一个名为停止播放< /strong> 并且可以将其设置为在 __ 张幻灯片之后。
我浏览了对象模型,甚至尝试使用 ppt 2003 记录宏(该选项不记录)。如何(如果可以)通过VBA设置此选项?
我当前添加声音的方式(在幻灯片前进后停止)是:
Dim oSlide As Slide
Dim oShp As Shape
Dim oEffect As Effect
Set oSlide = ActivePresentation.Slides(2)
Set oShp = oSlide.Shapes.AddMediaObject("C:\MyAudioClip.wav", True, False, 10, 10)
Set oEffect = oSlide.TimeLine.MainSequence.AddEffect(oShp, msoAnimEffectMediaPlay, , msoAnimTriggerWithPrevious)
oEffect.MoveTo 1
To play an audio clip inserted as a shape across multiple slides in a presentation, there is an option in the Play Sound dialog in the Effect tab called Stop playing and this can be set to After __ slides.
I've browsed the object model and even attempted recording a macro using ppt 2003 (the option does not record). How (if it can) can this option be set via VBA?
The way I'm currently adding a sound (that stops after the slides are advanced) is:
Dim oSlide As Slide
Dim oShp As Shape
Dim oEffect As Effect
Set oSlide = ActivePresentation.Slides(2)
Set oShp = oSlide.Shapes.AddMediaObject("C:\MyAudioClip.wav", True, False, 10, 10)
Set oEffect = oSlide.TimeLine.MainSequence.AddEffect(oShp, msoAnimEffectMediaPlay, , msoAnimTriggerWithPrevious)
oEffect.MoveTo 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this instead: