SlideMaster 的唯一标识符
虽然我意识到幻灯片母版在给定的演示文稿中具有唯一的名称(尽管我知道这是有问题的),但有没有办法唯一地标识用户无法触摸的母版?或者,是否有与幻灯片的标签集合等效的东西,我可以在某个地方存放我自己的 ID?
对于 PowerPoint 2003 和/或 2007...提前致谢。
While I realize that a SlideMaster has a unique name in a given presentation (though I understand this to be buggy), is there a way to uniquely identify a master that a user can't touch? Alternatively, is there an equivalent to the Slide's Tags collection, somewhere I can stash my own ID?
For PowerPoint 2003 and/or 2007... Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 PowerPoint 2007/2010 中,您可以使用
CustomXMLParts
作为标记。这是一个演示:需要记住的几件事:
会话之间的
slideMasterTag
。可能最好的地方是
在
CustomDocumentProperties
中,因此
RetrieveSlideMasterTag
常规。这是极不可能的
最终用户会进入这里。
CustomDocumentProperties
,您会只需要查询全部即可
使用 XPath 的
CustomXMLParts
XML。
或验证检查。你需要
查看创建代码以确保
还没有一个名为的标签
slideMasterTag
。In PowerPoint 2007/2010 you can use
CustomXMLParts
as sort of a tag. Here's a demo:A couple of things to remember:
slideMasterTag
between sessions.Probably the best place to do this is
in the
CustomDocumentProperties
,hence the
RetrieveSlideMasterTag
routine. It is highly unlikely that
an end user would go into here.
CustomDocumentProperties
, you wouldjust need to query all
CustomXMLParts
using XPath for yourXML.
or validation checking. You'll need
to see create code to ensure that
there is not already a tag called
slideMasterTag
.我最初认为没有好方法来保护 SlideMaster 名称不被用户使用,因为它似乎很容易通过 Master 视图提供。在 2007 年,这很容易实现,如上所示:功能区的“查看”选项卡、“幻灯片母版”按钮、右键单击任何母版并重命名。与 2003 年几乎相同,查看菜单 >大师>幻灯片母版,右键单击左侧缩略图列表中的相关母版,然后重命名。
令人高兴的事实是,这并没有重命名master,而是重命名设计。当涉及到这两个对象时,Ppt 对象模型并不是很简单;每个母版显然都是设计的父级,但出于所有意图和目的,它们都是一对一使用的,并且每个母版都将另一个公开为属性:
SlideMaster.Design
(对于“活动“仅限幻灯片母版)或Design.SlideMaster
(至少就幻灯片母版而言 - 我不与其他三个一起工作,所以不能在这里真正与他们交谈)。当用户执行上述一系列步骤时,等效的 vba 是myDesign.Name = "SomeNewName"
,而不是mySlideMaster.Name = "SomeNewName"
。主人的名字不受影响;同样,如果在 VBA 中执行mySlideMaster.Name = "SomeNewVBAName"
,用户可能选择的相应设计名称将保持不变。I initially thought there was no good way to protect a SlideMaster name from a user, because it seems to be very easily provided via the Master view. In 2007, this is very easy to get to, as indicated above: View tab of ribbon, Slide Master button, right-click any master, and rename. Pretty much the same in 2003, View menu > Master > Slide Master, right-click the master in question in the lefthand thumbnail list, rename.
The happy fact is that this does not rename the master but rather the design. The Ppt object model is not very straightforward when it comes to these two objects; each master is apparently the parent of a design, but for all intents and purposes, they are employed 1-to-1, and each exposes the other as a property:
SlideMaster.Design
(for the "active" slide master only) orDesign.SlideMaster
(at least as far as the slide master is concerned--I'm not working with the other three, so can't really speak to them here). When the user follows the series of steps detailed above, the equivalent vba ismyDesign.Name = "SomeNewName"
, notmySlideMaster.Name = "SomeNewName"
. The master's name is unaffected; likewise, if in VBA I executemySlideMaster.Name = "SomeNewVBAName"
, the corresponding Design name a user might have chosen remains intact.