Class MediaFormat (PowerPoint VBA)

Contains methods and properties that allow access to and control over audio and video media.

Class Shape gives access to class MediaFormat.

To use a MediaFormat class variable it first needs to be instantiated, for example

Dim mft as MediaFormat
Set mft = ActiveWindow.RangeFromPoint.MediaFormat

The following procedures can be used to set variables of type MediaFormat: Shape.MediaFormat and ShapeRange.MediaFormat.


Resample - Adds the current media object to the queue and begins resampling, based on the specified parameters.

ResampleFromProfile - Adds the current media object to the queue and begins resampling base on the specified profile.

SetDisplayPicture - Sets the display picture at the specified time position.

SetDisplayPictureFromFile - Sets the display picture from a picture file.


AudioCompressionType returns the audio compression format.

AudioSamplingRate returns the audio sampling rate per second for the media.

EndPoint gets or sets the time of the end point of the trim region of the media.

FadeInDuration gets or sets the duration of the fade in of the media, in milliseconds.

FadeOutDuration gets or sets the duration of the fadeout of the media, in milliseconds.

IsEmbedded returns whether the media file is embedded.

IsLinked returns whether the media file is linked.

Length returns the total length of the media in time units.

MediaBookmarks returns a MediaBookmarks collection that represents the media bookmarks associated with the specified object.

Muted returns whether audio playback of the media is muted. Read/write

ResamplingStatus returns the resampling task status.

SampleHeight returns the resolution height of the sample media.

SampleWidth returns the resolution width of the media sample.

StartPoint gets or sets the start point of the trim region.

VideoCompressionType returns a String that represents the video compression format of the media.

VideoFrameRate returns the video frame rate per second of the media.

Volume gets or sets the volume of the media.

MediaBookmarks - A collection of MediaBookmark objects.