Hi,
I have a Pictureframe on my presentation with a temp image, after locating the relevent shape object I pass it to the function below.
Private Sub ImageReplace(ByRef ImgShp As Shape)
Dim NewImg As Drawing.Bitmap
Dim NewPicId As Integer
'get the picture
NewImg = New Bitmap(MapPath(".") + “/bdrc/bestwestern.png”)
'add the picture to the presentation
With ImgShp.Parent
NewPicId = .Parent.Pictures.Add(New Picture(.Parent, newimg)
End With
'add the reference to the picture
ImgShp.FillFormat.PictureId = NewPicId
End Sub
The idea is to replaced the image with the new one, but I can not get this to work, can you help? I am using VB codebehind…
Thanks,
ZuluWarrior