Hello,
Can anyone suggest me a macro for what we do using Transformation >> Position . I want to copy multiple instances of an object placed next (Right)to each other.
Sub Macro1() Dim OS As ShapeRange, nc As Integer, w#, dup As ShapeRange Set OS = ActiveSelectionRange ActiveDocument.BeginCommandGroup "duplicate_object" nc = InputBox("Enter required number of copies of selected object") w = OS.SizeWidth Optimization = True For i = 1 To nc Set dup = OS.Duplicate dup.Move (i * w), 0 Next i
ActiveDocument.endCommandGroup
Optimization = False ActiveWindow.RefreshEnd Sub
Ok, then try this
Sub DupAndFlipHzRight()
' Recorded 9/19/2013
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim dup1 As ShapeRange
Set dup1 = OrigSelection.Duplicate
ActiveDocument.ReferencePoint = cdrMiddleRight
dup1.Stretch -1#, 1#
dup1.OrderToFront
dup1.Flip cdrFlipHorizontal
OrigSelection.RemoveFromSelection
End Sub
Sub DupAndFlipVertDown()
ActiveDocument.ReferencePoint = cdrBottomMiddle 'change to cdrTopMiddle to dup up
dup1.Stretch 1#, -1#
dup1.Flip cdrFlipVertical