I am using the Powerpoint Interop to develop a Powerpoint 2010/2013 Add-In. As part of this, I need a reliable way to map picture shapes to filenames.
My original plan was to simply look them up based on order of appearance in the slides, keeping a counter of images found. I would then use this to look into the .pptx archive and figure out what images were on what slides (e.g. first picture found -> Picture 1.jpg, etc).
However, this does not seem to work in cases where a single image appears on more than one slide. Shape.Id
does not seem to be consistent per shape across slides, and Shape.Name
is stated to only be per slide in the MSDN documentation.
Is there a reliable way to compare picture shapes across slides, or will I have to resort to comparing width/height to try and find matches?