Compartir a través de


Shapes.AddMediaObject Method

Creates a media object. Returns a Shape object that represents the new media object.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function AddMediaObject ( _
    FileName As String, _
    Left As Single, _
    Top As Single, _
    Width As Single, _
    Height As Single _
) As Shape
'Usage
Dim instance As Shapes
Dim FileName As String
Dim Left As Single
Dim Top As Single
Dim Width As Single
Dim Height As Single
Dim returnValue As Shape

returnValue = instance.AddMediaObject(FileName, _
    Left, Top, Width, Height)
Shape AddMediaObject(
    string FileName,
    float Left,
    float Top,
    float Width,
    float Height
)

Parameters

  • FileName
    Type: System.String
    Required. The file from which the media object is to be created. If the path is not specified, the current working folder is used.
  • Left
    Type: System.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
    Type: System.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
    Type: System.Single
    The width of the media object's bounding box, in points.
  • Height
    Type: System.Single
    The height of the media object's bounding box, in points.

Return Value

Type: Microsoft.Office.Interop.PowerPoint.Shape

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.PowerPoint Namespace