每个Powerpoint演示文稿文件(.ppt或.pptx)是否有任何唯一的ID? [英] Is there any unique ID associated with each Powerpoint presentation file (.ppt or .pptx)?

查看:287
本文介绍了每个Powerpoint演示文稿文件(.ppt或.pptx)是否有任何唯一的ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经检查了MSDN,并且Presentation对象模型(

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 )

根据代码示例,只能通过名称来标识一个Presentation.例如

According to the code example, a Presentation can only be identified by a name only. e.g.

Presentations("Sample Presentation").Slides.Add 1, 1

我是否可以通过ID识别演示文稿?希望它看起来像这样

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

推荐答案

PowerPoint对象模型不提供任何特殊ID.您可以使用 FullName 属性Presentation类的名称,以唯一地标识演示文稿.

The PowerPoint object model doesn't provide any special ID. You can use the FullName property of the Presentation class to identify presentations uniquely.

如果您对该解决方案不满意,可以考虑添加自己的ID作为自定义文档属性.演示文稿的 CustomDocumentProperties 属性类返回一个DocumentProperties集合,该集合表示指定演示文稿的所有自定义文档属性.

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.

这篇关于每个Powerpoint演示文稿文件(.ppt或.pptx)是否有任何唯一的ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆