Resize Pictures At Once

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
How can I resize hundreds of pictures to the same size at once?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
How can I resize hundreds of pictures to the same size at once?
You are missing a lot of details. Assuming you mean pictures on a worksheet, that the worksheet is named "Sheet5", that you do not want to preserve the aspect ratio for each picture and you want to make them all 200 wide by 300 high...
Code:
Sub ResizeAllPicturesOnWorksheet()
  With Sheets("Sheet5").Pictures
    .ShapeRange.LockAspectRatio = False
    .Width = 200
    .Height = 300
  End With
End Sub
If you do want to preserve the individual aspect ratios, then you can only change one dimension. Assuming this, let's say you wanted to make them all 400 tall...
Code:
Sub ResizeAllPicturesOnWorksheet()
  With Sheets("Sheet5").Pictures
    .ShapeRange.LockAspectRatio = True
    .Height = 400
  End With
End Sub
 
Last edited:
Upvote 0
Sorry! Each row is at a height of 79.80 and width of 17.33. I am copying hundreds of pics from an e-mail and pasting them into Excel but they all appear to be sized differently so I want to size all pics to 1.1" high and 1.36" wide so they fit into my cells.
 
Upvote 0
Sorry! Each row is at a height of 79.80 and width of 17.33.
The aspect ratio for those dimensions is 0.217168... is that the aspect ratio of all your pictures now?

If not, then you are aware forcing the pictures to that aspect ratio will distort them, correct?

Are your pictures already in position with the top left corner of your picture aligned with the top left corner of the cell they go with?

If not, how do you plan to move them into position? Is there a particular order they need to be in? If so, how is that determined?
 
Upvote 0
The aspect ratio for those dimensions is 0.217168... is that the aspect ratio of all your pictures now?

If not, then you are aware forcing the pictures to that aspect ratio will distort them, correct?

Are your pictures already in position with the top left corner of your picture aligned with the top left corner of the cell they go with?

If not, how do you plan to move them into position? Is there a particular order they need to be in? If so, how is that determined?


Resizing does not distort my pics unless I am enlarging.

No, when I copy and paste into Excel, they are thrown on top of each other in the same size as they are in the e-mail from whence they came.


Once I resize, I pan on moving one by one since I do not know another method. There is a particular order so the pic on top of all the others goes to the last cell and the pic underneath all the others goes into the first empty cell.
 
Last edited:
Upvote 0
Resizing does not distort my pics unless I am enlarging.

No, when I copy and paste into Excel, they are thrown on top of each other in the same size as they are in the e-mail from whence they came.


Once I resize, I pan on moving one by one since I do not know another method. There is a particular order so the pic on top of all the others goes to the last cell and the pic underneath all the others goes into the first empty cell.

Let me see if I can help in moving the pictures in my code. How are the pictures to be laid out... how many across, how many down? Also, what is the address of the first and last cell? Are the cells arranged so that so that one picture "fills up" one cell or will the pictures overlap multiple cells? If multiple cells, how many (across and down) for each picture?
 
Upvote 0
To change the properties of all the shapes on a sheet at the same time:
Select one shape
use Select All
Format Shape

and it will effect all shapes the same way. including proportional resize.
 
Upvote 0
To change the properties of all the shapes on a sheet at the same time:
Select one shape
use Select All
Format Shape

and it will effect all shapes the same way. including proportional resize.
One proviso with Mike's suggestion... use it as long as there are no other shapes on the worksheet, otherwise they will be resized (and distorted, I think) at the same time.
 
Upvote 0
Would it be easier if I post my workbook?
Yes, so long as you have one worksheet with the pictures one on top of the other and then a second worksheet with those same pictures arranged in their final position (the order of the pictures should be coordinated so that when the code I write executes, it sees the pictures in the proper order and so I can check the final arrangement against what you have on the second worksheet).

Note that you cannot attach your workbook to your message... you have to post it to a free and well-known file sharing facility like DropBox.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top