Alexander Bartsev said:
How I can insert an image into a shape in Word document using VBA?
Thanks
To insert a picture into a shape, the picture *must* be an InlineShape
object -- otherwise, you have to insert two separate Shape objects,
overlap them, and possibly group them.
The code for the InlineShape goes something like this:
Dim oShp As Shape
Dim oImg As InlineShape
Set oShp = ActiveDocument.Shapes.AddShape( _
Type:=msoShapeOval, Left:=100, _
Top:=100, Width:=200, Height:=200)
With oShp.TextFrame.TextRange
Set oImg = .InlineShapes.AddPicture( _
FileName:="c:\clips\picture.gif")
End With