Welcome. I would like to ask for help in writing a macro that duplicates the last selected object and places copies in separate PowerClips.
The loop should look like this:
.GetSize of first PowerClip object
duplicate the last previously selected object
make size of copied object same as first Powerclip
place the copied object do the first PowerClip
and the same loop for other powek clips
I would be grateful for your help :)
This works for me in a recent version of CorelDRAW. I don't know if there is anything that would need to be changed to make it work in X4.
Sub dupe_to_powerclips() Dim sToDupe As Shape Dim sDupe As Shape Dim sr As ShapeRange Dim lngCounter As Long On Error GoTo ErrHandler ActiveDocument.BeginCommandGroup "Dupe to PowerClips" Set sr = ActiveSelectionRange Set sToDupe = sr(1) For lngCounter = 2 To sr.Count Set sDupe = sToDupe.Duplicate sDupe.SetSize sr(lngCounter).SizeWidth, sr(lngCounter).SizeHeight sDupe.AddToPowerClip sr(lngCounter), cdrTrue Next lngCounter ExitSub: ActiveDocument.EndCommandGroup Exit Sub ErrHandler: MsgBox "Error occured: " & Err.Description Resume ExitSub End Sub
In use, it looks like this:
VIDEO: Dupe to PowerClips
.
Great, in x4 works without any problems :)
I am very thankful for your help, because this solution will save me a lot of time.
Thank You.
Hello friend, how do you make this same macro be used with the power clip inserted proportionally.