View Full Version : Loading and using "Macros"

Mitchell Andrus
01-25-2007, 8:29 AM
Another thread notes a macro for X3 that I'd like to try out - "no dups". I haven't got a clue....

For un-informed... A slow motion tutorial please.


Lee DeRaud
01-25-2007, 11:08 AM
Are you talking about a macro or a VBA '.gms' file?

If you go to 'Start->Programs->CorelDRAW Graphics Suite X3->Documentation', there's an entry labeled "CorelDRAW X3 Programming Guide for VBA". That's a PDF with a whole bunch of cool stuff about VBA add-ons for Corel...last section explains how to install and launch.

Shaddy Dedmore
01-25-2007, 12:16 PM
After you save the GMS file in C:\Program Files\Corel\CorelDRAW Graphics Suite 13\Draw\GMS you just have to run it by going to TOOLS, VISUAL BASIC, PLAY then search for NoDupes under the pull down menu where it says MACROS IN:

Right now it does the whole current page. I can change it to be "Current Selection" if that's necessary.


Bob Tate
01-25-2007, 12:30 PM
Shaddy, I tried the NoDupes out this morning. It works very well, I am sure I will use it a lot. Thank you for a wonderful, useful utility.

Mitchell Andrus
01-26-2007, 8:35 AM
Thank You. I've been in front of computers since '72 - this is my first macro. No dupes worked quite well.

George M. Perzel
01-26-2007, 9:23 AM
Hi Shaddy;
I used your No Dupes on my gear file-worked fine. I tried it on the attached file and got the error message shown on Page 2 plus the program went weird-can't do anything and have to exit and restart. Any ideas??
Best regards;

Shaddy Dedmore
01-26-2007, 3:15 PM
It has to do with the artistic text, I'll have to take a look tonight to see what the best way around it is. One option is to convert to curve, but the best option would probably be to ignore the text. That means youd have to get rid of the extra text manually though.

However you'd rather handle it I can add to the code.


Mike Mackenzie
01-26-2007, 6:26 PM

Maybe you can help.

I have a customer that needs to print date codes onto parts that is not that difficult to figure out however what they would like to do is to use the date from windows.
So is it possible to create a macro that will pull the date from windows and insert it into a file within Corel?
The reason is they want to take all of the risk factor away from the operator.
once the computer is turned on then that date becomes the data that will be printed onto there product. If they then go away for a week and then come back in and turn on the system they would want it to print that current date.
Does this make sense?
Could you please advise if this is possible?
If it is possible They would be willing to pay someone for there time in setting this up.

George M. Perzel
01-26-2007, 6:38 PM
Hi Shaddy;
Thanks for taking the time to work on this- I can eliminate the text manually.
Also thanks to all who have submitted solutions-just a super responsive and knowledgeable group of folks.Best regards;

Shaddy Dedmore
01-26-2007, 7:36 PM
Here's the newer GMS file

And I noticed it already will only look at what you have selected first, if nothing is selected, then it does the whole current page.

This new one will also skip the current object when it detects an error.

As for you Mike (troublemaker), yes it's possible. VBA has an inherent function called (funny enough) "Date". As in, in the code I could put something like
textbox1.text = Date
and the text of that box would turn to "1/26/2007" or it could be formated to something else.

The issue is just getting the date there. I would suggest using the object Name feature (in the Object Manager docker) to name some text boxes something like "TodaysDate". Then I could make a simple macro that would search out all text boxes with the name "TodaysDate" and change the text to whatever the date is.

So, some things to plan ahead for is, if it's a text box, it must be large enough to not hide any part of the day if there's a lot of numbers, or just larger one. Is it going to be centered both up and down, and right to left? Otherwise different dates may need to be moved around to look good every time...

you can email me at shaddy at shaddysengraving dot com


Mike Mackenzie
01-26-2007, 10:23 PM
Thanks shaddy,

I will have to get back to you next week I am off to work a show until Wednesday next week.