1

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
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304

1 Answers1

3

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.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • 1
    Eugene's correct. Either a document property or a presentation level tag would allow you to add your own unique ID. Note that FullName isn't foolproof. C:\Temp\ThisFile.PPTX on my computer and on your computer could be entirely different presentations, but same FullName. Or Anthony might need to be able to determine that a given file, no matter where it's stored or what it's named, is actually the file he's looking for. FullName would fail again, but tags or doc props would work. I prefer tags because the user won't be able to see/edit them. – Steve Rindsberg Feb 04 '15 at 15:33