Previous Document Next Document

Object Model Reference : Classes : A : Application : Methods : Application.CreateRegistrationColor


Application.CreateRegistrationColor

Function CreateRegistrationColor() As Color

Description

Member of Application

The CreateRegistrationColor method creates a registration Color object. Registration color is printed on all separation plates.

VBA example

The following VBA example creates cropmarks around one or more selected objects and assigns registration color to each of them.

Sub Test()
 Const Offset As Double = 1 ' Cropmark offset
 Const Length As Double = 5 ' Cropmark length
 Dim x As Double, y As Double, w As Double, h As Double
 Dim c As Color
 ActiveDocument.Unit = cdrMillimeter
 Set c = CreateRegistrationColor()
 ActiveSelection.GetBoundingBox x, y, w, h, True
 ActiveLayer.CreateLineSegment(x - Length - Offset, y, x - Offset, y).Outline.Color = c
 ActiveLayer.CreateLineSegment(x, y - Length - Offset, x, y - Offset).Outline.Color = c
 ActiveLayer.CreateLineSegment(x + w + Offset, y, x + w + Length + Offset, y).Outline.Color = c
 ActiveLayer.CreateLineSegment(x + w, y - Length - Offset, x + w, y - Offset).Outline.Color = c
 ActiveLayer.CreateLineSegment(x - Length - Offset, y + h, x - Offset, y + h).Outline.Color = c
 ActiveLayer.CreateLineSegment(x, y + h + Length + Offset, x, y + h + Offset).Outline.Color = c
 ActiveLayer.CreateLineSegment(x + w + Offset, y + h, x + w + Length + Offset, y + h).Outline.Color = c
 ActiveLayer.CreateLineSegment(x + w, y + h + Length + Offset, x + w, y + h + Offset).Outline.Color = c
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.