IOleObjectFrameSetEmbeddedData Method

Sets information about OLE embedded data.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.6.0.0 (21.6)
Syntax
void SetEmbeddedData(
	IOleEmbeddedDataInfo embeddedData
)

Parameters

embeddedData
Type: Aspose.SlidesIOleEmbeddedDataInfo
Embedded data IOleEmbeddedDataInfo
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen embeddedData parameter is null.
Remarks
This method changes the properties of the object to reflect the new data and sets the IsObjectLink flag to false, indicating that the OLE object is embedded.
Examples
Following example demonstrates how to change OLE embedded data and its type for existing IOleObjectFrame object
[C#]
using (Presentation pres = new Presentation("SomePresentation.pptx"))
{
    OleObjectFrame oof = pres.Slides[0].Shapes[0] as OleObjectFrame;
    if (oof != null)
    {
        IOleEmbeddedDataInfo newData = new OleEmbeddedDataInfo(File.ReadAllBytes("Picture.png"), "png");
        oof.SetEmbeddedData(newData);
    }
}
See Also