Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image in Excel
Message
From
18/10/2005 18:15:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01059802
Message ID:
01060079
Views:
13
>>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")
>....

OK, that may be an interesting alternative. But still, when I just created the picture, how do I know with what name or number I can refer to it? AFAIK, the Insert() method doesn't return this number.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform