I am building an Excel to PDF converter for use in my company and I have an excel file with a company logo in it. I need to export this picture to a file so I can then embed it into the pdf.
My problem is that I cannot associate the Picture in the sheet with a picture in MSOPictures. Sheet.DrawingObjects.Pictures.Items[0].PictureName has the name of the file without the extenstion, but MSOPictures.Items[0].Filename is blank. So I don't know how to associate them.
Exporting TSheet Pictures
Re: Exporting TSheet Pictures
After doing some research, it seems that the PictureID of Sheet.DrawingObjects.Pictures.Items[x] relates to the index into MSOPictures as
PicID:= Sheet.DrawingObjects.Pictures.Items[x].PictureID;
MSOPicIndex:= PicID-1;
ThePicture:= XLS.MSOPictures.Items[MSOPicIndex];
Is this correct?
PicID:= Sheet.DrawingObjects.Pictures.Items[x].PictureID;
MSOPicIndex:= PicID-1;
ThePicture:= XLS.MSOPictures.Items[MSOPicIndex];
Is this correct?