PowerPoint vba - 对于 MasterView 中每个布局中的每个形状
我正在尝试以编程方式更改 PowerPoint 模板中每个自定义布局中每个形状的语言,但我不知道如何执行此操作。我以前做过,但我找不到宏了,所以我真的不知道我是怎么做到的。不过,我已经能够选择每个自定义布局。但我需要循环遍历每个布局中的每个文本框并选择语言。我的问题是针对每个形状。我该怎么做?
这就是我到目前为止所得到的:
ActiveWindow.ViewType = ppViewSlideMaster
For Each oLayout In ActivePresentation.SlideMaster.CustomLayouts
oLayout.Select
Next
这基本上循环遍历每个布局。但我不知道如何选择每个占位符?我该怎么做?
编辑:现在的分辨率是:
For Each oLayout In ActivePresentation.SlideMaster.CustomLayouts
oLayout.Select
Dim oShape As Shape
For Each oShape In oLayout.Shapes
oShape.Select
Next
Next
I'm trying to programatically change the language of each shape in each customlayout in a PowerPoint template and I can't figure out how to do this. I've done it before, but I can't find the macro anymore so I don't really know how I did it. I've been able to select each custom layout though. But I need to loop through each textbox in each layout and select the language as well. My problem is targetting each shape. How do I do this?
This is what I've got so far:
ActiveWindow.ViewType = ppViewSlideMaster
For Each oLayout In ActivePresentation.SlideMaster.CustomLayouts
oLayout.Select
Next
This basically loops through each layout. But I can't figure out how to select each placeholder? How do I do this?
Edit: Resolution is now:
For Each oLayout In ActivePresentation.SlideMaster.CustomLayouts
oLayout.Select
Dim oShape As Shape
For Each oShape In oLayout.Shapes
oShape.Select
Next
Next
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
循环遍历
oLayout.Shapes
,或者可能是oLayout.Shapes.Placeholders
。Loop through
oLayout.Shapes
, or perhapsoLayout.Shapes.Placeholders
.谢谢你们两位。我需要一个解决方案来更新主幻灯片上嵌入的 Excel 对象。
这让我找到了完美的解决方案
Thanks you two. I needed a solution to updating an embedded Excel object on the master slide.
This lead me to the perfect solution