PDA

View Full Version : Insert picture into image frame



Tezzies
02-21-2008, 02:53 PM
Using Control Toolbox I have added a image frame to a slide. How do I use VBA to add a jpg to this image frame.


Many thanks in advance

:beerchug:

John Wilson
02-22-2008, 04:42 AM
Use this code to insert a picture

.Picture = LoadPicture("full path to pic here")
There are several ways to reference the frame

If you know the PowerPoint Object it is on (assumes its slide1 and frame has default name Image1)


slide1.Image1.Picture=loadpicture("full path to picture")

OR


ActivePresentation.Slides(1).Shapes("Image1").OLEFormat.Object _
.Picture = LoadPicture("full path to pic here")

If you intend doing this during a slide show you will also have to refresh the current slide or the picture may not appear to change until you quit.

Regards
John

Tezzies
02-22-2008, 07:42 AM
Thanks fo the help on that one.:friends: