View Full Version : Export Images


Sreedevi
08-26-2008, 06:12 AM
Hi All,

I have to export one report from one excel to another excel which includes even some(8-10) imges. When I export, only text is getting export. I want even images to get export. These images are in different sections, one image and under that some of it's details then space, again another image and some of it's details and so on...

As of now the code I have written is copy from Source sheet and paste to destination sheet as shown below:

prngSrc.Copy 'Source sheet
shDest.Cells(1, 1).PasteSpecial xlValues 'pasting on destination sheet
shDest.Cells(1, 1).PasteSpecial xlFormats

I even tried to use following code:

prngSrc.CopyPicture
shDest.Cells(1, 1).PasteSpecial Format:="picture", link:=False, displayasicon:=False

But it doesn't help, it copies only 1 image :mad:

Any help on this would be great!!!!!!!!!!!!

Thanks in advance!!!!!!!!

chergh
08-26-2008, 06:18 AM
You should be able to loop through the shapes collection for this. Something like:



for each pic in activesheet.shapes

pic.copypicture
shdest.paste

next pic