PlaySettings.StopAfterSlides Property
Returns or sets the number of slides to be displayed before the media clip stops playing. Read/write.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Property StopAfterSlides As Integer
Get
Set
'Usage
Dim instance As PlaySettings
Dim value As Integer
value = instance.StopAfterSlides
instance.StopAfterSlides = value
int StopAfterSlides { get; set; }
Property Value
Type: System.Int32
Long
Remarks
For the StopAfterSlides property setting to take effect, the PauseAnimation property of the specified slide must be set to False, and the PlayOnEntry property must be set to True.
The media clip will stop playing when the specified number of slides have been displayed or when the clip comes to an end — whichever comes first. A value of 0 (zero) specifies that the clip will stop playing after the current slide.
Examples
This example specifies that the media clip represented by shape three on slide one in the active presentation will be played automatically when it is animated, that the slide show will continue while the media clip is playing in the background, and that the clip will stop playing after three slides are displayed or when the end of the clip is reached — whichever comes first. Shape three must be a sound or movie object.
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)
With OLEobj.AnimationSettings.PlaySettings
.PlayOnEntry = True
.PauseAnimation = False
.StopAfterSlides= 3
End With