Macro help please.

Sure would be nice to be able to select multiple objects that are not clones and resize/scale them but have them stay in the place? i.e. scale from center of each.

example. I have 100 text headings that have all been converted to curves but each are separated as individual headings. The headings need to be 2% smaller. Select all the headings hit the macro first part would name all selected to "whatever" next part of macro would simply loop through the design and find first object named "whatever" then scale it from 100% to 98% then delete the name of the object now find next "whatever" and do the whole process until all "whatever" objects are scaled to 98%.

Myron

Parents
No Data
Reply
  • You can try this code

    Sub Resize()
    Dim sr As ShapeRange, s As Shape, x#, y#, sw#, sh#, sc#
    Set sr = ActiveSelectionRange 'in your case selected headigns
    sc = 0.98 'scale
    For Each s In sr
        x = s.CenterX
        y = s.CenterY
        sw = s.SizeWidth
        sh = s.SizeHeight
        s.SetSize sw * sc, sh * sc
        s.PositionX = x - s.SizeWidth / 2
        s.PositionY = y + s.SizeHeight / 2
    Next s
    End Sub

    Best regards

    Mek

Children
No Data