any easy fast possible way to group all these business cards separately. https://we.tl/tylZcTY3p6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Sub group_on_selected_rectangles() Dim srRectangles As ShapeRange Dim sRect As Shape On Error GoTo ErrHandler ActiveDocument.BeginCommandGroup "Group objects on selected rectangles" EventsEnabled = False Optimization = True Set srRectangles = ActiveSelectionRange For Each sRect In srRectangles ActivePage.SelectShapesFromRectangle sRect.LeftX, sRect.BottomY, sRect.RightX, sRect.TopY, False ActiveSelectionRange.Group Next sRect ExitSub: Optimization = False EventsEnabled = True ActiveDocument.EndCommandGroup Refresh Exit Sub ErrHandler: MsgBox "Error occurred: " & Err.Description Resume ExitSub End Sub
Eskimo,
I hope you do not mind, I have changed your code a little bit. I added some CQL to find all other shapes the same size as the original one selected.
Happy Coding,
-Shelby
Sub group_on_selected_rectangles() Dim srSelection As ShapeRange, srRectangles As ShapeRange Dim sRect As Shape Set srSelection = ActiveSelectionRange If srSelection.Shapes.Count > 1 Then MsgBox "Please only select one shape.": Exit Sub On Error GoTo ErrHandler ActiveDocument.BeginCommandGroup "Group objects on selected rectangles" EventsEnabled = False Optimization = True Set srRectangles = ActivePage.Shapes.FindShapes(Query:="@width = {" & srSelection(1).SizeWidth & " in } and @height ={" & srSelection(1).SizeHeight & " in }") For Each sRect In srRectangles ActivePage.SelectShapesFromRectangle sRect.LeftX, sRect.BottomY, sRect.RightX, sRect.TopY, False ActiveSelectionRange.Group Next sRect ExitSub: ActiveDocument.ClearSelection Optimization = False EventsEnabled = True ActiveDocument.EndCommandGroup Refresh Exit Sub ErrHandler: MsgBox "Error occurred: " & Err.Description Resume ExitSub End Sub
I did something much like that yesterday evening...
Sub make_powerclips_rectangles() Dim sr As ShapeRange Dim s1 As Shape Dim s2 As Shape Dim srExtracted As ShapeRange Set sr = ActivePage.Shapes.FindShapes(Query:="!@com.powerclip.IsNull") For Each s1 In sr Set s2 = ActiveLayer.CreateRectangleRect(s1.BoundingBox) s2.Outline.Color = s1.Outline.Color s2.Outline.Width = s1.Outline.Width Set srExtracted = s1.PowerClip.ExtractShapes s1.Delete srExtracted.AddToPowerClip s2 Next s1 End Sub
But on that page there are some other shapes not being powerclip... The ones necessary to be grouped.
On the contrary I think we should look for powerclip shapes, identify the parent type and act only on powerclip curve shapes ones.
I replaced all of the PowerClip frames with new PowerClip frames. I did not do anything to other content.
One reason I wrote it that way - replace them all - is because I was considering the option of being able to replace them all with larger rectangles.
I suppose that he needs to change their dimensions for all shapes inside the powerclip, not only the powerclip Parent. Proportionally...
Perhaps the client designed the cards at the wrong size?
Perhaps the client designed the cards at the correct size, but did not provide bleed?
Perhaps the client didn't arrange the cards so that they could be efficiently printed and then cut?
For "special" clients who are trying to "save money" by doing it themselves...
yes client designed the card at the wrong size because in india we make 2 size of business card 1st is 3.5X2 inch and another 3.465 X 2.165 inch. at last moment client change there mind and ask me to do that. here no one provide bleed and after designing everyone put on us to give bleed to design and on that case i use brian copymaster 1.3 from macromonster.com i just copy the background design delete all the text and logo etc and give bleed and paste on all pages of business cards like i did in this designs.
this is quite interesting..