I have a need to uniquely identify the potx template used to create a pptx file.
There are two existing places where the template name is used but neither are 100% reliable for my need.
This one can return null in some cases, or "blank" if the template has been deployed as the default "blank.potx" file:
Presentation.BuiltInDocumentProperties("Template")
This one does not do what one would think or what the documentation used to say and I corrected it recently on GitHub to reflect that it returns the name for the first design (master) in the presentation:
Presentation.TemplateName
So I had planned to develop a 'thumbprint' function which would analyse the Name properties for all of the masters and layouts in the Presentation.Designs collection.
This too has a problem in that the names returned are not always in English if the Office language is not English. It seems that Microsoft are translating the static name in the XML of the file for default layouts for both the presentation of it in the UI and the Object Model, for both the Name and MatchingName properties.
It appears there is no separation for Name and DisplayName (as there is for animation objects) when it comes to Design and CustomLayout objects.
Any ideas how to solve the original need, taking into account that the potx and pptx files are pre-existing so I can't use Tags or any other metadata to identify them? The only thing I can think of is building a table for the 11 default layouts for all 91 languages but tedium aside, that leads to a UTF issue as the solution needs to work on both Windows and macOS.