Let me first start off by explaining what I am trying to accomplish (maybe someone has some better way to go about accomplishing what I want.) At our business we have several different materials, and thicknesses that we cut. As the customers place their order online, our server automates their letters and fonts that they want cut, along with a pattern fill color depending on what material, and what thickness they use, and then that order is saved in it's file.
There are plenty of times for one reason or another that we have to manually apply the correct pattern fill for the order using the fill tool->pattern fill->full color-> and then selecting the correct pattern fill from the list. It gets tiresome pretty quickly after doing it several times, and from time to time the created pattern fills will no longer be in their user profile. So for a while we searched for a way for have a "pattern palette" similar to the color palette, with patterns saved in one location on our network.
The best way we have found to accomplish this is by making a macro to pull the pattern fill from the network, and apply it to the shape or letter. Then We have changed the icon for the button to run the macro to resemble the pattern, and created a separate toolbar to hold those, thus creating our "pattern palette"
So after all that, here is the main problem I am looking for a solution for. I have created a separate macro project, with the macros saved in it. (circled in the image below.)
Everything works great until i close coreldraw, and then re-open it. Once that happens, the project is no longer available. (as shown below)
I can then go and re-load the project, and everything works fine again. I just don't want to have to do that all the time, and train all of our other users how to load the macros, and where they are located, etc etc.. It seems like there has to be a way to have it always load.
Any suggestions that anyone has would be greatly appreciated. Keep in mind that I am pretty new to the world of macros, and could have VERY easily missed something simple. And like i said, if anyone has any ideas of a better/simpler way to accomplish the fill task, that would be great as well.
Hi.
Try Tools > Options > VBA
Uncheck Delay Load VBA
?
I am getting the same results with that option unchecked.
I'm not sure if I understand your problem. But there are a series of events in Corel VBA which get triggered on certain conditions, such as opening a file.
Here's an example showing how to display a user form whenever a document opens:
Private Sub GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String) If Not UserForm1.Visible Then PageResizer.UserForm1.Show False End IfEnd Sub
I've emphasised some code purely for identification. You will not see it formatted like that in the code.
The above needs to go into the ThisMacroStorage section of your project in the macro editor Project panel:
More conveniently, if you double click the ThisMacroStorage section you will see two dropdowns above the code pane. Set the first to GlobalMacroStorage and you will then be able to open the second drop down which shows the list of events or, by double clicking, can create the skeleton entry for the event that you want. So, you can choose whether you want your form displayed (or some other code executed) on other occasions.
The fills are located in a separate toolbar, not in a user form, so they are always there and easily available just like the color palette. Does that make sense?
I think I may have found my problem. My new project is not saved in the file path C:\Users\david\AppData\Roaming\Corel\CorelDRAW Graphics Suite X5\Draw\GMS. which is where it seems to look for all the macros by default. I would like to have it saved in one location on our network so that I can make any changes or additions in one location, and have everyone be updated, rather than going around to 15 different computers to get them updated. Is there a way to change the default path? Are there any disadvantages to that solution?
David Dransfield said: Is there a way to change the default path?
Ah, network location, yes that could explain it.
I use this program quite a bit. It works well.
Junction Link Magic
~John
Thanks for the tip about symbolic links!
So as I looked into it, it became more clear that Junction Link Magic was the way to go. I got it to work from a local location to local location, but when i tried from the network, it would not work. I'm not sure if it was a network setting or what, but I could not get it to work. So i looked around, and found another similar program. No luck. So decided to try another one I came across.
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#download
Link Shell Extension worked for me. weird URL, but it worked. So now i have one module saved in a network location that I can load macros in, and every connected computer automatically has access in Corel. Thanks for all the help!