Word 2007 VBA无法控制图片?

发布于 2024-07-14 19:06:19 字数 126 浏览 4 评论 0原文

尝试在 Word 2007 中录制宏,请注意您无法对图片执行任何操作。 (或者这是我的机器的本地问题?)

而且我什至无法在 Word 对象引用中找到图片/图像对象。

是什么赋予了?

Try recording a macro in Word 2007, notice you can't do a thing to pictures. (Or is this a local issue with my machine?)

And I can't even find the Picture / Image object within the Word Object Ref.

What gives?

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

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

发布评论

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

评论(2

岁月蹉跎了容颜 2024-07-21 19:06:19

在 Word 中,图像在内部被视为形状。 基本上有两种类型:InlineShapes(与文本内联对齐)和Shapes(所有形状都浮动在页面上)。

您可以根据图像的类型通过

With ActiveDocument.InlineShapes(1)
    .Width = 300
    .Height = 200
End With

或访问图像

With ActiveDocuments.Shapes(1)
    .Width = 300
    .Height = 200
End With

In Word, images are internally handles as shapes. There are basically two types: InlineShapes, which are aligned inline with the text, and Shapes which are all shapes floating on a page.

You can access an image depending on its type either via

With ActiveDocument.InlineShapes(1)
    .Width = 300
    .Height = 200
End With

or

With ActiveDocuments.Shapes(1)
    .Width = 300
    .Height = 200
End With
牵你的手,一向走下去 2024-07-21 19:06:19

录制时,您无法使用鼠标选择任何内容,因此必须使用键盘选择图片,然后使用菜单选项对其进行操作。

When recording you can't use your mouse to select anything so you have to use you keyboard to select the picture and then use the menu options to manipulate it.

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