如何在PowerPoint VBA中选择全部?
我已经挣扎了一段时间,以找到VBA代码来选择演示文稿的所有幻灯片和所有形状(由于某种原因,这似乎没有人的兴趣)。我试图设置所有幻灯片的范围,然后选择该范围的所有形状,但这不起作用。我还尝试通过幻灯片循环幻灯片并积累选择(msofalse),但是为此,您还需要激活每张幻灯片,而我无法做到这一点。 我认为立即选择所有幻灯片和形状对于操纵字体或运行完整咒语检查很有用。您的帮助将不胜感激!!
I have been struggling for a while to find a VBA code to select all the slides and all the shapes of a presentation (for some reason this seems to be of no one's interest). I have tried to set up a range with all the slides and then select all the shapes of the range, but that does not work. I also try looping slide by slide and accumulate the selection (msoFalse), but for that you also need to activate each slide and I was unable to do that.
I think selecting all the slides and shapes at once is useful to manipulate the fonts or run a full spell check. Your help would be really appreciated!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常可以避免在VBA中选择对象。这是不可靠和缓慢的。相反,循环遍历每个幻灯片上的每个形状并执行所需的任何操作:
如果您创建了一个字体主题并将其应用于幻灯片主和布局,则通常更容易,更快地通过修改主题和/或Master来更改字体而不是使用VBA。拼写检查也不需要VBA。
Selecting objects in VBA is generally to be avoided. It's unreliable and slow. Instead, loop through every shape on every slide and perform whatever operation you need:
If you've created a font theme and applied it to the Slide Master and Layouts, it's usually easier and faster to change fonts by modifying the theme and/or master rather than using VBA. VBA isn't needed for a spellcheck either.