Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing pasted pictures
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing pasted pictures
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 Abhimanyu Sirohi wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing pasted pictures
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 "John" wrote: 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 Abhimanyu Sirohi wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing pasted pictures
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 "John" wrote: 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 Abhimanyu Sirohi wrote: 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing pasted pictures
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 "John" wrote: 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 Abhimanyu Sirohi wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you export pictures from my pictures file into a word docu | New Users to Excel | |||
Pictures pasted as bitmap don't appear in Excel 2002 | Excel Discussion (Misc queries) | |||
Viewing pictures inserted or cut and pasted into excel | Excel Discussion (Misc queries) | |||
Pictures.Visible question (after adding many pictures, they stop disappearing) | Excel Programming | |||
Excel's Compress Pictures or deleting pictures doesn't seem work | Excel Discussion (Misc queries) |