Accessing pasted pictures

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a Shared Add-In in Visual Studio 2005 using Interop assemblies
for Office XP. (v10).
I want to put pictures in cells, so I copied them to the clipboard and
pasted on a range (single cell). Now, Is there anyway I can access these
pasted pictures. Excel names them "Picture 1", "Picture 2" and so on. Even if
I rename "Picture 1", the newly pasted picture is "Picture 2".
Also, Is there a way to avoid copying to the clipboard and then pasting the
picture. Any direct method to insert a picture in worksheet (I have an Image
object not a filename, so Shapes.AddPicture won;t work).

regards
 
The pictures will be members of the shapes collection, so you could
access them that way.
Somethign like:

Sub mypics()
Dim myObj As Object

For Each myObj In ActiveSheet.Shapes
If myObj.Type = msoPicture Then
MsgBox myObj.Name
End If
Next myObj
End Sub
 
Hi,
But how do I get the name of picture I've just pasted. This iteration will
return all the pictures. I need the one I've pasted right now.

thanks
 
Hi,
But how do I get the name of picture I've just pasted. This iteration will
return all the pictures. I need the one I've pasted right now.

thanks
 
Hi,
But how do I get the name of picture I've just pasted. This iteration will
return all the pictures. I need the one I've pasted right now.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top