• I want to thank all the members that have upgraded your accounts. I truly appreciate your support of the site monetarily. Supporting the site keeps this site up and running as a lot of work daily goes on behind the scenes. Click to Support Signs101 ...

Resize page corel macro

jessew1987

New Member
Hey Guys, I just made this macro for myself and thought maybe someone on here could use it. Basically it takes your selected object and makes the page size a bit larger than your object and centers the object to the page. It makes the page size larger based on percentage, not a static measurement so you always have a good amount of space. Because I use multiple pages, I don't like working off the page. Obviously signs are usually much larger than letter size paper, so if you're constantly resizing the page to fit your large sign, than this might be for you.

Sub pgsz()

Dim W As Double
Dim H As Double

Dim W2 As Double
Dim H2 As Double

Dim OB As Shape

Set OB = ActiveShape
If OB Is Nothing Then
MsgBox "Please Select an object", vbExclamation, "Error"
End
End If
W = ActiveSelection.SizeWidth / 2.5
H = ActiveSelection.SizeHeight / 2.5

W2 = ActiveSelection.SizeWidth + ((W + H) / 2)
H2 = ActiveSelection.SizeHeight + ((W + H) / 2)

ActivePage.SetSize W2#, H2#

If ActiveSelection.Shapes.Count = 1 Then
ActiveSelection.AlignToPage cdrAlignHCenter, cdrTextAlignBoundingBox
ActiveSelection.AlignToPage cdrAlignVCenter, cdrTextAlignBoundingBox
Else
ActiveSelection.Group
ActiveSelection.AlignToPage cdrAlignHCenter, cdrTextAlignBoundingBox
ActiveSelection.AlignToPage cdrAlignVCenter, cdrTextAlignBoundingBox
ActiveSelection.Ungroup
End If

End Sub
 

BadAss

New Member
Sounds like it would be great, But I have no idea how to apply that in Corel. I have never done macros ....
 

rcook99

New Member
I almost never work on the page. Why do you work on the imaginary page outline?

I work on a page that is sized to the sign board or banner that I will be using. I find it easier to see it laid out that way.
 

signmeup

New Member
I work on a page that is sized to the sign board or banner that I will be using. I find it easier to see it laid out that way.
Well, I'll be....
I just draw a rectangle the size of the banner if I'm working on a banner. If I'm working on a sign I draw the shape of the sign and work on that. The little page thingy distracts me.
 

joeshaul

New Member
I usually ignore the page as well, unless there's a specific need for it.
I usually snap to objects and everything, so if I'm making a 4x8 sign, I just make a 4x8 rectangle and leave the page at its default, and normally just export to EPS with Selection.

Knowing how the page system works though can be beneficial. One example where I use pages is on my draft/design sheets, I basically have a locked master page that has my company info, my client's info, signature boxes, and etc. In the middle I just paste and resize my artwork to fit the page, insert the next page, paste drawing, etc, then can print or e-mail. Saves a lot of work and looks very professional, although I usually only use it for the casinos and city offices.
 

signmeup

New Member
I have Corel setup as near as possible to a drafting program as I can get it. No page size and "snap to everything possible" including "dynamic guides".
 

rcook99

New Member
Signmeup
Well, I'll be....
I just draw a rectangle the size of the banner if I'm working on a banner. If I'm working on a sign I draw the shape of the sign and work on that. The little page thingy distracts me.

I may give your way a try and see how it works.
 

signmeup

New Member
I'd like a Corel macro that would let me "pin" drop-down menus so they stayed dropped down until I "unpinned" them. Is that possible? I had that in Geoworks and I loved it. (Geoworks was IBM's operating system before Windows took over the world)
 

Jester1167

Premium Subscriber
No more drop downs X3 and X4 they are dockers. They lock on the right side and toggle between several.

I love dynamic snapping too.
 

Attachments

  • Graphic1.jpg
    Graphic1.jpg
    125.3 KB · Views: 137
  • Graphic2.jpg
    Graphic2.jpg
    171.1 KB · Views: 134

signmeup

New Member
Here is a screen shot of what I would like to have. Sometimes I get doing something that I have to keep clicking on the drop down menu to accomplish a repetative task. If I could pin the drop down(or flyout) it would speed things up......wouldn't need a docker.....

BTW Corel 12 has those dockers . I just found this such a useful feature when I had it in Geoworks that I miss it. It was in the operating system so, as I recall, it worked on all programs.
 

Attachments

  • CorelPin.jpg
    CorelPin.jpg
    47.6 KB · Views: 165

rcook99

New Member
Here is a screen shot of what I would like to have. Sometimes I get doing something that I have to keep clicking on the drop down menu to accomplish a repetative task. If I could pin the drop down(or flyout) it would speed things up......wouldn't need a docker.....

I have found that most of what you are looking for will either be open in your tool bar if set up correctly and if you can't find it on your toolbar try RIGHT clicking and you will get a flyout from your cursor that will give you many other options instead of always going to your tool bar. Maybe this will help ya.:thumb:
 

signmeup

New Member
The "order" button is a big one for me. I sometimes need a few tries to get things in the right order when copy/pasting and trimming etc. If I could pin the drop down with "order" in it it would save me time. I know it sounds dumb but I found this "pinning" a very useful feature.
 

jessew1987

New Member
The reason I use pages is because we have a page for quote and a page for quote sent. I've always had issues in Corel trying to work off the page while having multiple pages. This is the way that we work here, but at SignRite, we never used multiple pages. So I guess not many people on here use multiple pages.

To install this macro:

1. Open Visual Basic from inside Corel Draw. Tools/Macros/Macros Editor (I think it's Visual Basic Editor in X3) OR just hit **ALT-F11**
2. On the left, go to:
-Global Macros
-Modules
-CorelMacros (Double click)

3. Paste code below the last "end sub"

4. Go to Tools/Customization/ [Macros] (from the drop down list)

5. Click GlobalMacros.pgsz.

Now you can set a shortcut or drag and drop icon onto a toolbar to use.

Hope this helps.

Jesse
 
Last edited:

Decal_Designs

New Member
Hey Jesse,

I know this thread is really old, but I just found it with a search. I have just tried the Macro yo have made and it works great in X5.
I did rename it to PageSize in the editor so I can remember what it is a year from now. I do have a question about the settings for

W = ActiveSelection.SizeWidth / 2.5
H = ActiveSelection.SizeHeight / 2.5

W2 = ActiveSelection.SizeWidth + ((W + H) / 2)
H2 = ActiveSelection.SizeHeight + ((W + H) / 2)

I noticed that when I change the numbers to something higher than 2.5 the page gets smaller and smaller the larger the number I choose. It also does the same thing if I use a higher number than 2 in the W2 and H2 lines.

Can you, or somebody explain how these settings differ from each other?

In other words, is there any need to change the numbers in both the W and H lines and the W2 and H2 lines?

By the way, I find this macro extremely useful for the way I work.

Now I just have to figure out how to make the shortcut to it.

Thanks!!
 

Wafels

New Member
Sorry for bringing old post back, but found this one useful.

Works with corel x6 , changed code so it places selected object to middle of page and resizes it to object size plus 3mm bleed. Useful for printing previews or sending vinyl for printer.

Code:
Sub PageSizeToObject()

Dim W2 As Double
Dim H2 As Double

Dim OB As Shape

Set OB = ActiveShape
If OB Is Nothing Then
MsgBox "Please Select an object", vbExclamation, "Error"
End
End If

W2 = ActiveSelection.SizeWidth + 0.11811
H2 = ActiveSelection.SizeHeight + 0.11811

ActivePage.SetSize W2#, H2#

ActiveSelection.AlignAndDistribute cdrAlignDistributeHAlignCenter, cdrAlignDistributeVAlignCenter, 
cdrAlignShapesToCenterOfPage, cdrDistributeToSelection, False, cdrTextAlignBoundingBox

End Sub
 
Last edited by a moderator:

Decal_Designs

New Member
It's funny you brought up this old thread Wafles. I use a slightly different macro code based on Jesse's original code, but I must say that I still use this Page ReSize Macro several times a day, everyday.
 

Wafels

New Member
I've been looking for this kind of macro for quite a while already.
It sure can save a lot of time, now only to manage macro like I had it in illustrator, 2x10 square boxes ready to be clicked :)
 
Top