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...How can I resize hundreds of pictures to the same size at once?
Sub ResizeAllPicturesOnWorksheet()
With Sheets("Sheet5").Pictures
.ShapeRange.LockAspectRatio = False
.Width = 200
.Height = 300
End With
End Sub
Sub ResizeAllPicturesOnWorksheet()
With Sheets("Sheet5").Pictures
.ShapeRange.LockAspectRatio = True
.Height = 400
End With
End Sub
The aspect ratio for those dimensions is 0.217168... is that the aspect ratio of all your pictures now?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?
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.
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.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.
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).Would it be easier if I post my workbook?