title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Shapes.AddMediaObject method (PowerPoint) |
vbapp10.chm543025 |
|
|
7e2ab704-7fd4-86d7-3f61-8d69c13b5685 |
06/08/2017 |
medium |
Important
Deprecated in PowerPoint 2013. See Shapes.AddMediaObject2 method (PowerPoint). Creates a media object. Returns a Shape object that represents the new media object.
expression. AddMediaObject
( _FileName_
, _Left_
, _Top_
, _Width_
, _Height_
)
expression A variable that represents a Shapes object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
FileName | Required | String | Required String. The file from which the media object is to be created. If the path isn't specified, the current working folder is used. |
Left | Optional | Single | The position (in points) of the upper-left corner of the media object's bounding box relative to the upper-left corner of the document. |
Top | Optional | Single | The position (in points) of the upper-left corner of the media object's bounding box relative to the upper-left corner of the document. |
Width | Optional | Single | The width of the media object's bounding box, in points. |
Height | Optional | Single | The height of the media object's bounding box, in points. |
Shape
This example adds the movie named "Clock.avi" to myDocument.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddMediaObject FileName:="C:\Windows\clock.avi", _
Left:=5, Top:=5, Width:=100, Height:=100
[!includeSupport and feedback]