Duplicate works fine, but when I try to record a macro, it duplicates but the object is no longer held by the mouse.
Recording doesn't work that great with X7 either. Best to learn how to code yourself.
Myron is right; recording has significant limitations compared to even simple write-it-yourself VBA.
Thank you for replying. How does one learn how to code oneself?
You might look at some of the content provided by Sub GDG_John( ) - GDG Macros VBA Lessons; lots of good stuff there.
The Developer Area has a number of resources, too.
I have an entry in my blog - #1: Getting started with using VBA macros (What do you do with a .GMS file?) - that describes the folders where .GMS files are typically located.
I think that some of the very early "getting started" information in John's GDG Macros VBA Lessons - how to create a .GMS file, and where to put it - may not be accurate for recent versions of CorelDRAW. If something there is confusing or doesn't work, then ask here, and someone will help you get started.
Ahhh. Alt+F11. Changed my life.
Recording macros can be helpful in the beginning when you are figuring the language out. There is an occasional benefit which can hang around for some time even as you get more and more comfortable with manual coding, but it diminishes as you become familiar with what things are called and which actions are controlled by which "magic words". Otherwise, yep, Myron and Eskimo are right and it sounds like you're interested. Good. Its amazing. Seriously, it can even be mind-blowingly amazing what you can do with code.
A few years ago I came around here looking for help too and was well guided by some of these guys.
Be sure to check out the Object Browser (F2) in VBA. Search terms like "shape", "curve", "active", etc. and browse the results, pushing F1 on those which interest you, which will bring up the help window that frequently contains an example piece of code and an explanation of what it does. For example, I just did a search for "active", clicked on the row in which "Application" is the class and "ActiveSelection" is the member, pressed F1 and was shown:
The following VBA example colors the selected shapes green, if the shape selected is an ellipse.
Sub SelectionActive()Dim s As ShapeFor Each s In ActiveSelection.ShapesIf s.Type = cdrEllipseShape Thens.Fill.UniformColor.CMYKAssign 100, 0, 100, 0End IfNext sEnd Sub
You copy and paste that into VBA, which you'll know how to do after following Eskimo's advice, then try it out. Then try 50 more if you like. You'll learn how it works, and why. Someone showed me this when I was getting started, and its a nice beginner's boost:
Assign shortcuts to your macros or create buttons in Corel's Options (ctrl+j). There will be a point where you will probably need to do both, as you run out of logical key and key combo choices.
It can be tough to get started, but if you stick with it you'll benefit greatly.