Hello,
I got a problem with a macros which have to resize imported images, crop them to specific size and ordering them 3x3 per page. Can you help me with the code?
For the moment I succeeded to make this:
Sub Macro1() '15 sm = 5.905512 '13 sm = 5.11811 '10 sm = 3.937008 '9 sm = 3.543307 NumberImages = 2 DimensionX = 5.905512 DimensionY = 3.937008 ActiveDocument.ReferencePoint = cdrCenter For i = 1 To NumberImages If ActiveLayer.Shapes(i).SizeWidth > ActiveLayer.Shapes(i).SizeHeight Then ActiveLayer.Shapes(25).Rotate 90# ActiveLayer.Shapes(i).SetSize 0, DimensionY If ActiveLayer.Shapes(i).SizeWidth < DimensionX Then ActiveLayer.Shapes(i).SetSize DimensionX, 0 End If Next End Sub
But cropping each image to the dimensions don't want to work. Any help with arranging 3x3 per page and centering them on each page A3 will be great.
From your code I understand you are working with 2 sizes of images (probably photos)
1. 9x13 cm - 3 images imported, resized and imposed 3x3 on A3 (42x29.7 cm)
2. 10x15 cm - 2 images imported, resized and imposed 2x2 on A3 (42x29.7 cm)
I have included another size to my code - 13x18 cm - 2 images imported, resized and imposed 2x2 on A3 (42x29.7 cm)
Attached code is also creating rectangle around the group of ordered pictures with bleed 3 mm.
Best regards,
Mek
ResizeAndOrdering.gms
Mek, thank you for the reply. Generally its working, but I suppose I have to explain a little bit more the task. I had to order 1200 photos (all made with different cameras, have different sizes, different proportions) to print them. Part of them I have to make them 90x130 mm (other part 100x150 mm) ordered 3x3 on a sheet with size 487x330 mm. Because of this I have to import for example 198 images in the coreldraw file, to resize them to 90x130 mm (if the proportion is 90x135, I have to crop or powerclip the image to 90x130 mm). Then I have to center the group of 9 ordered already images, to center them on the page with the right orientation, and continue ordering every 9 images on different page. An option to change resolution of images to 150,200,300 DPI will be great. For me the big problem was to crop or powerclip the image to specific size, to order them and center the group of 9 images. When I try to crop an image, the rest of them disappear from the workspace. Thank you again spending your time to help me. Best regards, Filip