Thread: [Solved] Organize shapes
View Single Post
 
Old 05-01-2019, 03:48 AM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
The images will adapt to the document width if the images are larger than the page width to start with, however smaller images will not.

The reason your code stacks the images is that you are converting them to shapes and adding a wrap option, for some reason which is not entirely clear, and then you are not repositioning the shapes. I see no reason to change them to shapes. The following will set your margins (though you could have done that before inserting the pictures) and will set the width to the width between the margins. As it is almost inevitable that there will be room for only one image on a page they will then be on separate pages.
Thanks gmayor!

I did some improvements, the code below will proportionally scale the shape to fit page margins (width and height) and apply a rotation (only available in shapes).

Have any optimization suggestions? Thanks!

Code:
 Code under construction

Last edited by eduzs; 05-01-2019 at 07:21 PM.
Reply With Quote