BreadCrumbs: CorelDraw
CorelDraw
From Luke Jackson
(Difference between revisions)
| Revision as of 01:02, 5 April 2007 (edit) Ljackson (Talk | contribs) (→Center Shapes and Crop Document) ← Previous diff |
Revision as of 01:03, 5 April 2007 (edit) Ljackson (Talk | contribs) (→Center Shapes and Crop Document) Next diff → |
||
| Line 21: | Line 21: | ||
| End Sub | End Sub | ||
| </pre> | </pre> | ||
| + | |||
| + | = Tags = | ||
| + | |||
| + | Visual Basic Script, Visual Basic Macro, CorelDraw11 | ||
| [[Category:Windows XP]] | [[Category:Windows XP]] | ||
Revision as of 01:03, 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
Tags
Visual Basic Script, Visual Basic Macro, CorelDraw11