scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.26k stars 499 forks source link

Add imgW, imgH params to `shapes.add_ole_object()` #909

Closed scanny closed 10 months ago

scanny commented 10 months ago

When a custom icon is used, the default p:oleObj imgW and imgH values are not correct and in later versions of PowerPoint for Windows, the embedded-object shape may be resized to become unsightly when it is double-clicked to open the embedded object (such as an XLSX file).

Add parameters to allow these values to be specified. Their values must be discovered via inspection of the XML as generated by PowerPoint when the same icon is used to embed an object "by hand" using the PowerPoint app.