Class Player (PowerPoint VBA)

Allows access to playback controls for the associated shape in the current window. To use a Player class variable it first needs to be instantiated, for example


Dim ply as Player
Set ply = Dim lngShapeId As Long: lngShapeId = 
ActiveWindow.View.Player(ShapeId:=lngShapeId)

CurrentPosition

Gets or sets a Long that represents the current position of the player in the media.


ActiveWindow.View.Player.CurrentPosition =

GoToNextBookmark

Goes to the next bookmark.


ActiveWindow.View.Player.GoToNextBookmark

GoToPreviousBookmark

Goes to the previous bookmark.


ActiveWindow.View.Player.GoToPreviousBookmark

Pause

Pauses the media.


ActiveWindow.View.Player.Pause

Play

Begins playback for the specified media.


ActiveWindow.View.Player.Play

State

Returns the current state of the player. Possible return values are ppNotReady - Not ready, ppPaused - Paused, ppPlaying - Playing, ppStopped - Stopped.

State can return the following PpPlayerState values.


Dim ppsState As PpPlayerState
ppsState = ActiveWindow.View.Player.State

Stop

Stops the media playing in the specified object.


ActiveWindow.View.Player.Stop