Would it be possible to create a macro that looks at visible objects (and/or groups of objects) and resizes them automatically? They would need to be either a specific height or width and never larger than either dimension. For example - if the max height was .5" and the max width was 1" and if the partiicular object is enlarged to .5" tall and that makes it more than 1" wide then it would resize to the 1" width instead, and vice versa. Hopefully this makes sense.
You can try following code
Sub test()Dim s As Shape, wmax#, hmax#, sr As ShapeRangeActiveDocument.Unit = cdrMillimeterActiveDocument.BeginCommandGroup ("test")Set sr = ActivePage.FindShapes.AllFor Each s In srIf s.SizeHeight > hmax Then hmax = s.SizeHeightIf s.SizeWidth > wmax Then wmax = s.SizeWidthNext sFor Each s In srIf s.SizeHeight / s.SizeWidth > 1 Then s.SetSize , hmaxIf s.SizeWidth > wmax Then s.SetSize wmaxIf s.SizeHeight / s.SizeWidth < 1 Then s.SetSize wmaxNext sActiveDocument.EndCommandGroupEnd Sub
Best regards
Mek
You are welcome.
Change Set sr = ActivePage.FindShapes.All
to
Set sr = ActivePage.Shapes.All