如何选择刚刚通过VBA粘贴到MS Word的图像 [英] How do you select an image that was just pasted to MS Word via VBA
本文介绍了如何选择刚刚通过VBA粘贴到MS Word的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只需使用以下内容将图像粘贴到VBA中的MS Word
Just pasted an image to MS Word in VBA using the following
wordApp.Selection.PasteSpecial DataType:=wdPasteMetafilePicture, Placement:=wdInLine
我的想法是向左移动一个字符,然后选择下一个对象,但是我不知道该怎么做.
My thinking is to move one char left and then select next object, but I don't know how to do this.
下面是一些令人赞叹的开发,使用下面的代码行,我能够选择包含图像的段落,但是由于选择了一个范围,所以我无法对其进行操作.有人知道我如何固定选区中的图像吗?
Well here are some encoraging development, using the following line, I was able to select the paragraph which include the image, but I can't manipulate it because it's selecting a range. Do anyone know how I can pin down the image inside the selection?
wordApp.Selection.Expand wdParagraph
推荐答案
这是我使用的:
wordApp.Selection.Find.Execute replace:=2
wordApp.Selection.Expand wdParagraph
wordApp.Selection.InlineShapes(1).Select
这篇关于如何选择刚刚通过VBA粘贴到MS Word的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文