View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default A Pictures Puzzle

The naming convention for pictures STINKs in Excel. The name property cannot
be changed. Excel assigns a name to the picture when it is inserted.
Haven't found a way to change the name.

I ussually find the name by using the following loop

for each myshape in worksheets.shapes

msgbox(myshape.name)

next myshape

"eBob.com" wrote:

I have some thumbnails (all .jpgs) which I am trying to insert into rows in
a spreadsheet. All are reported by Windows Explorer to have a Width of 60
pixels and a Height of 100 pixels. Using various programs all look to be
exactly or nearly exactly the same size. But when I insert these pictures
into a spreadsheet only one of them is the size I think it should be - i.e.
the size all of these pictures appear to be when rendered by various
programs - all of the others are shrunk to about 1/5th to 1/4th the size
they appear to be when rendered by various programs.. After a lot of
experimentation I think that the problem might relate to "resolution". The
one picture which ends up the "right" size when inserted is 72x72dpi. Most
of the other pictures are 300x300, one is 180x180. Note that all of the
shrunk pictures appear to be the same size - i.e. the 180x180 picture
appears to be the same size as the 300x300 pictures.

First question: does it sound like I am on the right track? If so, second
question: what's the best solution. I know I can size the pictures, but I
am creating this spreadsheet programmatically using VB.Net. So, first
problem, it looks like I have to figure out how Excel names inserted
pictures. (Using record macro the first line of the macro is
ActiveSheet.Shapes("Picture 7").Select. Ok, I was probably playing with the
7th or maybe 8th inserted picture. BUT ... will future versions of Excel
name pictures in EXACTLY the same way?) But using VB.Net I also have the
option of invoking some program which can change resolution. Maybe, there's
a lot of mystery to all of this pictures stuff. And I sure don't know
off-hand of any programs which can adjust resolution.

But, if I do go with changing the size in Excel, and I expect I will, which
is better - to change the "size" height and width, or the "scale" height and
width. Both seem to achieve the desired result. But maybe one method
retains more fidelity than the other. I don't see any difference but I know
that my eyes are not the best.

Thanks for reading all this. I'll be grateful for any advice and/or
sympathy. Bob