Sub CenterObjects()'center_objects1Dim OrigSelection As ShapeRangeSet OrigSelection = ActiveSelectionRangeOrigSelection(2).AlignToShape cdrAlignHCenter + cdrAlignVCenter, OrigSelection(1), cdrTextAlignBoundingBoxEnd Sub
Only two objects are accepting to make it center... if i select more... then this macro not working.
please update
Hello, I can't understand exactly what you want. Try this. I hope it works for you.
Sub Center_selected_shapes_to_page_center()'ActiveDocument.ActiveLayer.Shapes.All.AlignToPageCenter (cdrAlignVCenter)ActiveSelection.Shapes.All.AlignToPageCenter (cdrAlignVCenter)ActiveSelection.Shapes.All.AlignToPageCenter (cdrAlignHCenter)End Sub
firstset i selected one object and later selected the another single element, then the above script is working. if i have select the muliple object at second time.... then the above script is not working
Hello,I understand, that You select first one object - suppose with name Object1.After that You select other objects - 1 - 2 - 3 etc. You wont that all other objects are centered to Object1?Greetings!
yes