Shapes Moves to Pages: CorelDraw Macro - How to create and Code this Macro Full Explain

Опубликовано: 30 Сентябрь 2024
на канале: Scripts 'n' Macros
1,043
15

How to move selected shapes form a page to multiple pages and center them in CorelDraw using a Macro. In this video I have created a Macro and explained each and every bit of code. Hope you will like this video.

You can download the coreldraw file with code from the link given below:

Here is the code snippet:
Sub shapes_to_pages()
Dim s As Shape
Dim pThis As Page

For Each s In ActiveSelectionRange
Set pThis = ActiveDocument.AddPages(1)
s.MoveToLayer pThis.Layers("Layer 1")
s.CenterX = pThis.CenterX
s.CenterY = pThis.CenterY
pThis.SizeHeight = s.SizeHeight
pThis.SizeWidth = s.SizeWidth
Next s
End Sub