gpt4 book ai didi

vba - 通过 VBA 将音频剪辑添加到跨多张幻灯片的 PowerPoint 演示文稿

转载 作者:行者123 更新时间:2023-12-03 03:19:22 27 4
gpt4 key购买 nike

要播放演示文稿中多张幻灯片中作为形状插入的音频剪辑,效果选项卡中的播放声音对话框中有一个名为的选项停止播放,可以将其设置为在 __ 张幻灯片之后

我浏览了对象模型,甚至尝试使用 ppt 2003 记录宏(该选项不记录)。如何(如果可以)通过VBA设置此选项?

Stop Playing After __ slides option

我当前添加声音的方式(在幻灯片前进后停止)是:

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

最佳答案

试试这个:

Dim oSlide As Slide
Dim oShp As Shape
Dim oEffect As Effect

Set oSlide = ActivePresentation.Slides(1)

Set oShp = oSlide.Shapes.AddMediaObject("p:\testfile\media\minivincent.wav", True, False, 10, 10)

With oShp.AnimationSettings.PlaySettings
.PlayOnEntry = True
.PauseAnimation = False
.StopAfterSlides = 19
End With

关于vba - 通过 VBA 将音频剪辑添加到跨多张幻灯片的 PowerPoint 演示文稿,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6986507/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com