Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the images are the only objects you have on the worksheet, you could
Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Anne,
But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
J_J wrote:
Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. You can acheive the obvious scaling of the displayed images, but it will quickly get out of hand with huge filesizes of full resolution images in Excel. You would be better off using an image handling application to batch resize copies of the originals down to the required size first and then importing them. eg Irfanview(free) would do it. Loading a 5Mpixel image to show a 160x120 thumbnail is very inefficient... Regards, Martin Brown |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi. I've not done this, so I'll just throw this out as an option to
explore. Under Tools | Options | General | Pictures Tab.., there is an option for "Screen Size:". Perhaps try an experiment and save a copy of your work as a web page, using File | Save as web page... Perhaps if you import this page later into Excel, maybe they'll be the size you need. I'm not sure if that option just displays the picture at the selected size, or will reduce all pictures to the desired size as the file is saved. If you try this, I'd be curious how it worked. :) HTH. -- Dana DeLouis Win XP & Office 2003 "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Every image has a Heigth and Width property which can be set. This doesn't
maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Demo3()
Dim pic As Object Dim r As Range Dim i As Long For i = 1 To 10 Set pic = ActiveSheet.Pictures.Insert( _ "C:\My Pictures\Sample" & i & ".jpg") Set r = Range("D1").Offset(i, 0) pic.Top = r.Top pic.Left = r.Left pic.Width = r.Width pic.Height = r.Height Next End Sub -- Regards, Tom Ogilvy "J_J" wrote in message ... Hi Tom, Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the example Tom,
Forgive me but where have you set your code to let the "r" variable hold the "20" value actually? (Sorry if my doesnt look noble :) Regards J_J "Tom Ogilvy" wrote in message ... Sub Demo3() Dim pic As Object Dim r As Range Dim i As Long For i = 1 To 10 Set pic = ActiveSheet.Pictures.Insert( _ "C:\My Pictures\Sample" & i & ".jpg") Set r = Range("D1").Offset(i, 0) pic.Top = r.Top pic.Left = r.Left pic.Width = r.Width pic.Height = r.Height Next End Sub -- Regards, Tom Ogilvy "J_J" wrote in message ... Hi Tom, Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Sir,
I am Sorry for my typing mistakes in my previous post. But here is my question again Thank you for the example Tom, Forgive me but maybe I am not keen enough to see. In your example code, Where have you set the "r" variable to hold the "20" value actually?. Or have you programmed such that cell D1 dimension will be the used for all *.jpg images through D1:D10? Regards J_J "Tom Ogilvy" wrote in message ... Sub Demo3() Dim pic As Object Dim r As Range Dim i As Long For i = 1 To 10 Set pic = ActiveSheet.Pictures.Insert( _ "C:\My Pictures\Sample" & i & ".jpg") Set r = Range("D1").Offset(i, 0) pic.Top = r.Top pic.Left = r.Left pic.Width = r.Width pic.Height = r.Height Next End Sub -- Regards, Tom Ogilvy "J_J" wrote in message ... Hi Tom, Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
r is a reference to a range.
This was sample code to show you the components you can use to build your required solution. If you are putting 11 pictures in column D in cells D2 to D12, then logically, each picture would be the height of the cell. Likewise, it would make sense to make them as wide as the cell. So you can make the cells as high and as wide as necessary to meet your 20 x 20 criteria. then my code matches the picture to exactly fit the cell. If you don't want to do that, then do pic.Top = r.Top pic.Left = r.Left pic.Width = 20 pic.Height = 20 -- Regards, Tom Ogilvy "J_J" wrote in message ... Dear Sir, I am Sorry for my typing mistakes in my previous post. But here is my question again Thank you for the example Tom, Forgive me but maybe I am not keen enough to see. In your example code, Where have you set the "r" variable to hold the "20" value actually?. Or have you programmed such that cell D1 dimension will be the used for all *.jpg images through D1:D10? Regards J_J "Tom Ogilvy" wrote in message ... Sub Demo3() Dim pic As Object Dim r As Range Dim i As Long For i = 1 To 10 Set pic = ActiveSheet.Pictures.Insert( _ "C:\My Pictures\Sample" & i & ".jpg") Set r = Range("D1").Offset(i, 0) pic.Top = r.Top pic.Left = r.Left pic.Width = r.Width pic.Height = r.Height Next End Sub -- Regards, Tom Ogilvy "J_J" wrote in message ... Hi Tom, Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Tom,
I'll try your code and get back to here if face any other problem. You were most helpful, and patient with me.:) As always. Best wishes J_J "Tom Ogilvy" wrote in message ... r is a reference to a range. This was sample code to show you the components you can use to build your required solution. If you are putting 11 pictures in column D in cells D2 to D12, then logically, each picture would be the height of the cell. Likewise, it would make sense to make them as wide as the cell. So you can make the cells as high and as wide as necessary to meet your 20 x 20 criteria. then my code matches the picture to exactly fit the cell. If you don't want to do that, then do pic.Top = r.Top pic.Left = r.Left pic.Width = 20 pic.Height = 20 -- Regards, Tom Ogilvy "J_J" wrote in message ... Dear Sir, I am Sorry for my typing mistakes in my previous post. But here is my question again Thank you for the example Tom, Forgive me but maybe I am not keen enough to see. In your example code, Where have you set the "r" variable to hold the "20" value actually?. Or have you programmed such that cell D1 dimension will be the used for all *.jpg images through D1:D10? Regards J_J "Tom Ogilvy" wrote in message ... Sub Demo3() Dim pic As Object Dim r As Range Dim i As Long For i = 1 To 10 Set pic = ActiveSheet.Pictures.Insert( _ "C:\My Pictures\Sample" & i & ".jpg") Set r = Range("D1").Offset(i, 0) pic.Top = r.Top pic.Left = r.Left pic.Width = r.Width pic.Height = r.Height Next End Sub -- Regards, Tom Ogilvy "J_J" wrote in message ... Hi Tom, Say I have ten *.gif images on my HDD with varous sizes (height:between 20-50 and width:between 50-100). I want to display them on Sheet1 in cells D2 to D12 with a fixed height and width-say 20x20). How can I setup a macro to do that?. Thanks to: Martin and Dana too J_J "Tom Ogilvy" wrote in message ... Every image has a Heigth and Width property which can be set. This doesn't maintain the aspect ratio, however. Post back with more information if this doesn't help you. -- Regards, Tom Ogilvy "J_J" wrote in message ... Thanks Anne, But this ain't the case... I need to import images from different *.gif files on my HDD and want to display them say in column H2:H50 I want to make sure that whatever the original sizes of the images are on the files, I want them to appear with same sizes on column H2:H50. This is especially a problem for me, because of bigger images within the bunch... Sincerely J_J "Anne Troy" wrote in message news:ea4dc$42c106b6$97c5108d$9371@allthenewsgroups .com... If the images are the only objects you have on the worksheet, you could Edit--Go to--Special, choose Objects, OK. Then Format--Picture, and resize. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "J_J" wrote in message ... Hi, Can we automatically adjust the sizes of images that we import as *.gif etc files into excel so that all images displayed on an excel sheet (or within excel cells) are the same?. How?. VBA solution is also accepted. Regards J_J |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Chart.Export images are shrinking as I export more images | Charts and Charting in Excel | |||
Embedded images shrink in Chart area when printing | Charts and Charting in Excel | |||
shrink to fit in excel | Excel Worksheet Functions | |||
Shrink to Fit | Excel Discussion (Misc queries) | |||
Shrink to Fit | Excel Discussion (Misc queries) |