Having followed the examples on Aspose.com, my code embeds an Excel Document into a Power Point presentation using Aspose.Slides for .NET 7.50. I also set an initial image on the object so that when the user opens the file they don’t get the Embedded Object placeholder.
This all works nicely, however when the user clicks on the object to open it, then clicks off, the object reshapes itself, and I think this is largely due to the Scale Height and Scale Width set by Aspose.Slides.
How can the scale height/scale width values be programmatically controlled?
I have attached several items:
PowerPointEmbeddedOleObjects.pptx, which shows the desired behaviour of clicking on an embedded object and clicking off. Note the object sizing keeps consistent. The documents were embedded using PowerPoint 2013
AsposeEmbeddedOleObjects.pptx which shows how the embedded objects have been embedded after using Aspose.Slides for .NET 7.5.0
1.jpg, 2.jpg and 3.jpg, which captures the behaviour of the before click, on click and after click state of an embedded excel document. Note the Scale Height and Scale Weight values.
Code.txt which shows the code used to embed an ole object.
LANDSCAPE.docx, PORTRAIT.docx, LANDSCAPE.xlsx, PORTRAIT.xlsx, the documents used to embed in the presentation, along with similarly named jpgs used to set as the ole object images.