Shapes.AddOLEObject (PowerPoint)

Creates an OLE object. Returns a Shape object that represents the new OLE object.

Syntax : expression.AddOLEObject (Left, Top, Width, Height, ClassName, FileName, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Link)

Dim shpAddOLEObject As Shape
Set shpAddOLEObject = ActiveWindow.Selection.SlideRange(1).Shapes.AddOLEObject()

Arguments

The following arguments are optional

Left (Single) - The position (in points) of the upper-left corner of the new object relative to the upper-left corner of the slide. The default value is 0 (zero).

Top (Single) - The position (in points) of the upper-left corner of the new object relative to the upper-left corner of the slide. The default value is 0 (zero).

Width (Single) - The initial width of the OLE object, in points.

Height (Single) - The initial height of the OLE object, in points.

ClassName (String) - The OLE long class name or the ProgID for the object that's to be created. You must specify either the ClassName or FileName argument for the object, but not both.

FileName (String) - The file from which the object is to be created. If the path isn't specified, the current working folder is used. You must specify either the ClassName or FileName argument for the object, but not both.

DisplayAsIcon (Office.MsoTriState) - Determines whether the OLE object will be displayed as an icon.

IconFileName (String) - The file that contains the icon to be displayed.

IconIndex (Long) - The index of the icon within IconFileName. The first icon in the file has the index number 0 (zero). If an icon with the given index number doesn't exist in IconFileName, the icon with the index number 1 (the second icon in the file) is used. The default value is 0 (zero).

IconLabel (String) - A label (caption) to be displayed beneath the icon.

Link (Office.MsoTriState) - Determines whether the OLE object will be linked to the file from which it was created. If you specified a value for ClassName, this argument must be msoFalse.