Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you export pictures from my pictures file into a word docu Becky New Users to Excel 1 November 20th 09 07:02 PM
Pictures pasted as bitmap don't appear in Excel 2002 [email protected] Excel Discussion (Misc queries) 0 March 12th 07 12:00 PM
Viewing pictures inserted or cut and pasted into excel Rex Excel Discussion (Misc queries) 1 February 6th 07 04:07 AM
Pictures.Visible question (after adding many pictures, they stop disappearing) Abe[_4_] Excel Programming 2 July 11th 06 05:02 AM
Excel's Compress Pictures or deleting pictures doesn't seem work guidod Excel Discussion (Misc queries) 1 January 29th 06 06:51 AM


All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"