Free Support Forum -

OleObject in PPT rendering incorrectly

Hello team,

We encountered an inconsistency while rendering OleObjects using Aspose.Slides for .NET v19.7 versus v19.8.

For our use case, we pass a byte array that we convert to an Aspose OleObjectFrame and another byte array that we convert to an image that serves as the SubstitutePicture for the OleObjectFrame.

However, when we pass these byte arrays to the abovementioned versions it looks like for 19.8 (and all versions after 19.8), when we double click on the OleObject (which in our cases in an active graph) it fails to get activated. In contrast to this, in 19.7 the graph activates just fine on double-click.

Attached (496.7 KB) are the expected and generated images and ppt along with the .txt files which contain both byte arrays.

Request you to change the path in the reproducer according to the location of the files in your system.

Please let us know if we missed something obvious.

Reproducer Function:

    static void ActiveGraph()
        byte[] oleObject = File.ReadAllBytes("PATH_TO_OleObject.txt");
        byte[] substituteImage = File.ReadAllBytes("PATH_TO_image.txt");

        IPPImage imgx;
        var presentation = new Presentation();
        var slides = presentation.Slides[0];

        var oleObjectFrame = slides.Slide.Shapes.AddOleObjectFrame(0, 0, 800, 600, "ole-object-class", oleObject);
        using (var outStream = new MemoryStream(substituteImage))
            imgx = presentation.Images.AddImage(outStream);
        oleObjectFrame.SubstitutePictureFormat.Picture.Image = imgx;
        presentation.Save("ActiveGraph.pptx", SaveFormat.Pptx);


After observing the example provided by you, I suggest you to please first try using latest Aspose.Slides for .NET 20.8 on your end. Secondly, in your case when you are adding OLE Object the Ole class is unknown. The class is important as this is related to what is inside OLE Object data. If the OIe data is an XLSX file the class would Excel.Sheet.12. If you provide the wrong class identifier as compare to what is inside OLE data the OLE object will not get activated once clicked.

Please try the latest version and share the feedback with us if there is still an issue so that we may investigate it further.

Hi @mudassir.fayyaz
Thanks a lot for the quick response.

Firstly, I did try the reproducer for v20.8 and it still won’t open, exactly how its behaving in 19.8.
Please check this image for your reference. Generated_20-8.PNG (67.8 KB)

Secondly, I understand your point about the class name being specific to the data contained by the Ole Object, however, for v19.7 using the above-mentioned class name (“ole-object-class”) I got the expected output, and the graph is activated correctly. Post 19.8 I am not getting the correct output. Any reason why that could be the case?



I have created an issue with ID SLIDESNET-42152 as investigation to further investigate this based on your assessment that whether if behavior exhibited in Aspsoe.Slides 19.7 was wrong or its an issue in Aspose.Slides for .NET 19.8 on wards to 20.8.