![]() |
#1
|
|||
|
|||
![]()
I have a macro that amongst other things resizes the page and adds some guidelines. I have lots of A5 documents and when I run it on one of them for some reason the origin is changing so that 0 is no longer in the bottom left corner. This hasn't happened to me before. Why would this change on one document and not the others? Is there anything I can add to my macro to force it to keep bottom left the origin for the rulers. I tried:
Code:
ActiveDocument.DrawingOriginX = 0 ActiveDocument.DrawingOriginY = 0 |
#2
|
|||
|
|||
![]()
Since when has 0 been the document center? This works but it's a faff:
Code:
ActiveDocument.DrawingOriginX = 0 - (ActivePage.SizeWidth / 2) ActiveDocument.DrawingOriginY = 0 - (ActivePage.SizeHeight / 2) |
#3
|
||||
|
||||
![]()
In VBA, the document origin of (0,0) was always in the center of the page. And the lower left corner as you guessed is (-page_width/2, -page_height/2). Once you set Document.DrawingOriginX/Y, then all the rest of API calls will be relative that point. So maybe that's why you are confused. Since all the methods like Layer.CreateRectangle are normally relative to lower left corner of the page simply because the proper drawing origin is set beforehand...
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting Drawing Origin in VBA | nic | CorelDRAW/Corel DESIGNER VBA | 2 | 30-10-2013 09:04 |
vba Left not working | runflacruiser | CorelDRAW/Corel DESIGNER VBA | 7 | 21-05-2010 11:20 |
Ruler to start top left of page instead of bottom left | fungel | General | 2 | 08-04-2009 13:07 |
Color pallet gone from bottom of screen | signweld | General | 1 | 21-08-2008 15:31 |
winAPI to capture a left-click? | Rick Randall | CorelDRAW/Corel DESIGNER VBA | 3 | 24-07-2007 13:38 |