InsertOleObjectFrame

InsertOleObjectFrame(int, float, float, float, float, IOleEmbeddedDataInfo)

Creates a new OLE object frame and inserts it into the shape collection at the specified index.

public IOleObjectFrame InsertOleObjectFrame(int index, float x, float y, float width, float height, 
    IOleEmbeddedDataInfo dataInfo)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the OLE object frame.
xSingleThe x-coordinate of the new OLE frame, in points.
ySingleThe y-coordinate of the new OLE frame, in points.
widthSingleThe width of the new OLE frame, in points.
heightSingleThe height of the new OLE frame, in points.
dataInfoIOleEmbeddedDataInfoThe embedded OLE data information (IOleEmbeddedDataInfo).

Return Value

The newly created IOleObjectFrame.

Examples

This example demonstrates inserting an OLE object at the second index:

[C#]
byte[] fileData = File.ReadAllBytes("test.zip");
IOleDataInfo dataInfo = new OleDataInfo(fileData, "zip");
IOleObjectFrame oleObjectFrame = slidees.Shapes.AddOleObjectFrame(2, 150, 20, 50, 50, dataInfo);

See Also


InsertOleObjectFrame(int, float, float, float, float, string, string)

Creates a new OLE object frame and inserts it into the shape collection at the specified index.

public IOleObjectFrame InsertOleObjectFrame(int index, float x, float y, float width, float height, 
    string className, string path)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the OLE object frame.
xSingleThe x-coordinate of the new OLE frame, in points.
ySingleThe y-coordinate of the new OLE frame, in points.
widthSingleThe width of the new OLE frame, in points.
heightSingleThe height of the new OLE frame, in points.
classNameStringThe class name of the OLE object.
pathStringThe path to the linked file.

Return Value

The newly created OLE object frame.

See Also