我需要编辑由AddPicture方法插入的图像的属性。使用AddPicture方法调整图像属性方法字vba
1)我需要的高度调整到0.5" ,宽度是可变的(锁定的宽高比)。
2)环绕文本=‘以文字上方’
这是possile与这种方法如果让我怎么添加这些属性如果没有,我应该用什么样的方法,以及如何
Sub replaceWithImage()
Dim imageFullPath As String
Dim FindText As String
imageFullPath = "C:\Logo.jpg"
FindText = "PlaceHolder"
'Application.ScreenUpdating = False
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.text = FindText
' Loop until Word can no longer
' find the search string, inserting the specified image at each location
Do While .Execute
Selection.MoveRight
Selection.InlineShapes.AddPicture FileName:=imageFullPath, LinkToFile:=False, SaveWithDocument:=True
Loop
End With
End With
End Sub
你试图与宏记录? –
是的。不对高度变化做出响应,并且不允许更改包装文字 – user1783736