vba - 如何选择刚刚通过 VBA 粘贴到 MS Word 的图像

标签 vba ms-word

刚刚使用以下命令将图像粘贴到 VBA 中的 MS Word 中

wordApp.Selection.PasteSpecial DataType:=wdPasteMetafilePicture, Placement:=wdInLine

我的想法是向左移动一个字符,然后选择下一个对象,但我不知道该怎么做。

编辑:

好吧,这里有一些令人鼓舞的发展,使用以下行,我能够选择包含图像的段落,但我无法操纵它,因为它正在选择一个范围。有谁知道我如何固定选择中的图像?
wordApp.Selection.Expand wdParagraph

最佳答案

这是我使用的:

wordApp.Selection.Find.Execute replace:=2
wordApp.Selection.Expand wdParagraph
wordApp.Selection.InlineShapes(1).Select

关于vba - 如何选择刚刚通过 VBA 粘贴到 MS Word 的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7636645/

相关文章:

vba - 我如何知道规则何时完成处理?

c# - 循环创建 MS Word 内容控件

excel - VBA 从模块调用工作表中的 SUB

algorithm - 计算 VBA 中所选(大)范围内不同值的数量?

excel - 为什么 Word 有 Application.Activate 方法,而 Excel 没有?

c# - 使用 MsiGetProductInfo 检查是否安装了 Microsoft Word

C# 和 MS Word,range.font.bold 不起作用

r - 输出到 MS Word 时的上标

CreateObject ("InternetExplorer.Application"中的 VBA 自动化错误)

excel - VBA 常量问题