在 PowerPoint VBA 中,如何微移窗口中所有当前的形状(不仅仅是一个)?

发布于 2024-08-10 13:00:11 字数 176 浏览 2 评论 0原文

据我了解,这段代码仅“抓取”活动窗口中的第一个形状并轻推它:

设置 oShape = oSlide.Shapes(1)

oShape.Left = oShape.Left + 5

如何“抓取”窗口中的所有形状并同时微移它们?

As far as I understand, this code "grabs" only the first shape in the active window and nudges it:

Set oShape = oSlide.Shapes(1)

oShape.Left = oShape.Left + 5

How can I "grab" all the shapes in the window and nudge them all at once?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮色兮凉城 2024-08-17 13:00:11

您可能可以迭代当前幻灯片的 形状< /code>集合来设置每一项。

Dim oShape As Shape

For Each oShape In oSlide.Shapes
    oShape.Left = oShape.Left + 5
Next

You could probably iterate through the current slide's Shapes collection to set each one.

Dim oShape As Shape

For Each oShape In oSlide.Shapes
    oShape.Left = oShape.Left + 5
Next
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文