BreadCrumbs: CorelDraw

CorelDraw

From Luke Jackson

Revision as of 01:02, 5 April 2007; Ljackson (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
Jump to: navigation, search

Macros

Center Shapes and Crop Document

Sub AutoCenterObject()
    ActivePage.Shapes.All.Group
    ActivePage.Shapes(1).CreateSelection
    Dim width As Double, height As Double
        ActiveDocument.Unit = cdrInch
        ' Add 0.05in margin
        width = ActiveShape.SizeWidth + 0.05
        height = ActiveShape.SizeHeight + 0.05
    ' Set current page size
    ActivePage.SetSize width, height
    ' Set default document page size
    ActiveDocument.Pages(0).SetSize width, height
    CorelScript.AlignToCenterOfPage 3, 3
    ActivePage.Shapes.All.UngroupAll
    ActiveDocument.ClearSelection
End Sub
Personal tools