问题
I have checked MSDN and there seems to be no unique ID (UUID or whatnot) property in the Presentation
object model ( https://msdn.microsoft.com/EN-US/library/office/ff746640(v=office.15).aspx )
According to the code example, a Presentation can only be identified by a name only. e.g.
Presentations("Sample Presentation").Slides.Add 1, 1
Is there anyway I can identify a presentation by way of an ID? Hopefully it will looks something like this
Presentations("067e6162-3b6f-4abc-a171-2470b63dff00").Slides.Add 1, 1
回答1:
The PowerPoint object model doesn't provide any special ID. You can use the FullName property of the Presentation class to identify presentations uniquely.
If you are not satisfied with that solution you may consider adding your own ID as a custom document property. The CustomDocumentProperties property of the Presentation class returns a DocumentProperties collection that represents all the custom document properties for the specified presentation.
来源:https://stackoverflow.com/questions/28310697/is-there-any-unique-id-associated-with-each-powerpoint-presentation-file-ppt-o