Class Player (PowerPoint VBA)

Allows access to playback controls for the associated shape in the current window.

Set

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)

The following procedures can be used to set variables of type Player: SlideShowView.Player and View.Player

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

Parent

Returns the parent object for the specified object. Read-only.

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 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