使用 VBA 创建 Powerpoint 幻灯片母版
我目前正在尝试使用 VBA 创建 Powerpoint (2010) SLide Master,但遇到了一些挑战。
1) 是否可以为模板中的占位符分配名称,以便随后在演示文稿中可以通过该名称来寻址该对象?我尝试使用 <.Name="...">
分配名称,但这似乎不起作用。基于这些布局的实际演示中的对象仍然具有随机的默认名称。
2) 如何为 CustomLayouts 指定名称?
3 如何加载一个真正空白的 SlideMaster/其中的 CustomLayouts?
PS:我不确定模板标签,还有其他模板吗?
I am currently trying to create a Powerpoint (2010) SLide Master with VBA and am running into some challenges.
1) Is it possible to assign names to the Placeholders in the Templates so that the object is addressable via this name in the presentation afterwards? I have tried to assign names with <.Name="...">
which doesn't seem to work. The objects in the actual presentation based on those Layouts still have random default names.
2) How do I assign names to CustomLayouts?
3 How do I load a really blank SlideMaster / the CustomLayouts within it?
PS: I am not sure about the templates tag, are those other templates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
换句话说,虽然您可以重命名主布局之一上的形状,但当您基于该布局创建幻灯片时,幻灯片上的形状仍然具有不同的名称?这就是 PPT 的工作原理。您想通过“预设”幻灯片上的形状名称来实现什么目的?也许还有另一种方式可以到达那里。
手动:
查看|幻灯片母版
右键单击布局的缩略图,然后选择“
通过 VBA 重命名布局”,例如:更改第一个幻灯片母版中第一个布局的名称:
我不明白这个问题。请更详细一点?
In other words, though you can rename a shape on one of the master layouts, when you base a slide on that layout, the shapes on the slides still have different names? That's the way PPT works. What are you trying to accomplish by "pre-setting" the names of shapes on slides? Perhaps there's another way of getting there.
Manually:
View | Slide Master
Rightclick the layout's thumbnail and choose Rename Layout
Via VBA, ex: change the name of the first layout in the first slide master:
I don't understand the question. More detail, please?