General information
Category:
COM/DCOM and OLE Automation
>I managed to insert an image into Excel (from a file on disk), with the .Insert method; now, I want to do additional manipulation. Since this is the only graphic, I simply accessed the first image in the collection of images. I don't have the exact code here right now, for reference, but I got it to work, at any rate.
>
>Now, I was wondering what would happen if I inserted several images, or worked with a previous spreadsheet, which may or may not already have images. How do I get the "handle" of the image I just inserted? If I check for the number of images - I guess it would be something like .Images.Count - and it returns a number "n", is it guaranteed that the next image has the number "n+1"? Or is there a better way to handle this?
Hilmar,
You may reffer to the picture name or/and set the recognizable name. Like:
oExcel.activesheet.pictures(2).Name="MyPicture1_Hello"
lo=oExcel.activesheet.pictures("MyPicture1_Hello")
....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only