OleFormatGetRawData Method

Gets OLE object raw data.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public byte[] GetRawData()

Return Value

Type: Byte
Examples
Shows how to get access to OLE object raw data.
// The document contains linked and embedded objects
Document doc = new Document(MyDir + "OLE objects.docx");

foreach (Node shape in doc.GetChildNodes(NodeType.Shape, true))
{
    // Get access to OLE data
    OleFormat oleFormat = ((Shape)shape).OleFormat;
    if (oleFormat != null)
    {
        Console.WriteLine($"This is {(oleFormat.IsLink ? "linked" : "embedded")} object");
        byte[] oleRawData = oleFormat.GetRawData();
    }
}
See Also