Adding picture into activedocument shapes

August 14th, 2011 - 12:12 pm ET by baha | Report spam
Hi Everyone,
I have a following code for adding bmp pictures which are named from
1 to 250, into activedocument shapes which are named from image1 to
image250. It seems like I am doing something wrong.Any help?
My code is
Private Sub CommandButton1_Click()
Dim i As Variant
For i = 1 To 250
ActiveDocument.Shapes("Image" & i).OLEFormat.Object.Object.Picture LoadPicture(ThisDocument.Path & "\Pictures\" & i & ".BMP")
Next i
End Sub

Thanks in advance
Baha
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 That Guy
August 17th, 2011 - 07:28 am ET | Report spam
So what exactly is happening?

I can guess at the error you are getting but it would be best if you
could describe the issue and then we can offer advice on how to fix
it.

Also the version of word you are using would be very helpful.

Similar topics