Macro to reset file Origin Coordinates

Hello,

I CorelDraw X6, how do I reset the origin coordinates to 0,0 (left bottom corner), I read that you can use "Page.SetOrigin" command but this is not available for the Corel 16.

Thank you in Advance

Jose 

Parents
  • For CorelDRAW X6 you would use Document.DrawingOriginX and Document.DrawingOriginY. 

    Sub Test()
        Dim doc As Document
        
        Set doc = ActiveDocument
        
        doc.DrawingOriginX = 0
        doc.DrawingOriginY = 0
        ActiveLayer.CreateRectangle 0, 0, 1, 1
        doc.DrawingOriginX = -doc.ActivePage.SizeWidth / 2
        doc.DrawingOriginY = -doc.ActivePage.SizeHeight / 2
        ActiveLayer.CreateEllipse 0, 0, 1, 1
    End Sub
    

    Here is an example, 

    Happy coding, 

    -Shelby

Reply Children
No Data