Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.88 KB

PowerPoint.Shapes.AddMediaObject.md

File metadata and controls

62 lines (37 loc) · 1.88 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shapes.AddMediaObject method (PowerPoint)
vbapp10.chm543025
vbapp10.chm543025
PowerPoint.Shapes.AddMediaObject
7e2ab704-7fd4-86d7-3f61-8d69c13b5685
06/08/2017
medium

Shapes.AddMediaObject method (PowerPoint)

Important

Deprecated in PowerPoint 2013. See Shapes.AddMediaObject2 method (PowerPoint). Creates a media object. Returns a Shape object that represents the new media object.

Syntax

expression. AddMediaObject( _FileName_, _Left_, _Top_, _Width_, _Height_ )

expression A variable that represents a Shapes object.

Parameters

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.

Return value

Shape

Example

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

See also

Shapes Object

[!includeSupport and feedback]