BreadCrumbs: CorelDraw

CorelDraw

From Luke Jackson

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:21, 28 March 2007 (edit)
Ljackson (Talk | contribs)

← Previous diff
Revision as of 01:02, 5 April 2007 (edit)
Ljackson (Talk | contribs)
(Center Shapes and Crop Document)
Next diff →
Line 21: Line 21:
End Sub End Sub
</pre> </pre>
 +
 +[[Category:Windows XP]]

Revision as of 01:02, 5 April 2007

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