2011-08-08 54 views
3

播放插入的演示文稿中的多張幻燈片的形狀音頻剪輯,沒有在選項播放聲音對話框中稱爲影響標籤停止播放,這可以設置爲後__幻燈片通過VBA來跨越PowerPoint演示文稿添加音頻剪輯多張幻燈片

我瀏覽過對象模型,甚至嘗試使用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 

回答

2

試試這個:

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 
相關問題