Coreldraw Macros Better (EXTENDED — 2026)
Result: If nothing is selected, it crashes. If the wrong shape is selected, it edits the wrong thing.
is a subset of the Microsoft Visual Basic programming environment. It’s an excellent choice for beginners yet remains powerful enough for advanced macro projects. VBA is installed with CorelDRAW by default and gives you access to the Macro Editor (formerly the Visual Basic Editor), where you can write, edit, and debug your code. Most documentation and community examples are written in VBA, making it the most accessible starting point. coreldraw macros better
Sub messWithShape() Dim s As Shape, sr As ShapeRange, i As Long ActiveDocument.BeginCommandGroup "Random Transform" Optimization = True Set sr = ActivePage.Shapes.All For i = 1 To sr.Count Set s = sr(i) ' Assign random CMYK value s.Fill.UniformColor.CMYKAssign Int(100 * Rnd + 1), Int(100 * Rnd + 1), Int(100 * Rnd + 1), Int(100 * Rnd + 1) s.Rotate Int(360 * Rnd + 1) Next i Optimization = False ActiveWindow.Refresh ActiveDocument.EndCommandGroup End Sub Result: If nothing is selected, it crashes
Dim s As Shape For Each s In ActivePage.Shapes If s.Type = cdrCurveShape Then s.Outline.Width = 2 End If Next s It’s an excellent choice for beginners yet remains
