Class MediaBookmarks (PowerPoint VBA)

A collection of MediaBookmark objects. To use a MediaBookmarks class variable it first needs to be instantiated, for example


Dim mbs as MediaBookmarks
Set mbs = ActiveWindow.RangeFromPoint.MediaFormat.MediaBookmarks

Add

Adds a new MediaBookmark at the specified time and using the specified name.

The collection is automatically re-sorted incrementally by time. This method returns an error if the bookmark already exists at that position, if the maximum number of bookmarks exceeds 512, or if the user tries to assign a name that has a length greater than 255 characters.

Add (Position, Name)


Dim lngPosition As Long: lngPosition = 
Dim strName As String: strName = 
Dim mbk As MediaBookmark
Set mbk = ActiveWindow.RangeFromPoint.MediaFormat.MediaBookmarks.Add(Position:=lngPosition, Name:=strName)

Arguments

The following arguments are required:

Position (Long) - The position of the MediaBookmark.

Name (String) - The name of the MediaBookmark.

Count

Returns the number of bookmarks.

Start and end points are implicit bookmarks, but they should not be part of the MediaBookmarks collection.


Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.MediaFormat.MediaBookmarks.Count

Item

Returns the specified MediaBookmark.

Item (Index)

Index: The position of the MediaBookmark.


Dim mbk As MediaBookmark
Set mbk = ActiveWindow.RangeFromPoint.MediaFormat.MediaBookmarks(Index:=1)