Previous Document Next Document

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


Application.CreateColor

Function CreateColor([ColorString As String]) As Color

Description

Member of Application

The CreateColor method creates a color object with default color properties.

This function is now obsolete because the Color object can be used with the New keyword.

Parameter
Description
ColorString
This parameter is optional.

VBA example

The following VBA examples show several ways to apply a cyan fill to the first selected object in the active document.

Sub CreateColor1()
 Dim c As Color
 Set c = CreateColor
 c.CMYKAssign 100, 0, 0, 0
 ActiveDocument.Selection.Shapes(1).Fill.ApplyUniformFill c
End Sub
Sub CreateColor2()
 Dim c As New Color
 c.CMYKAssign 100, 0, 0, 0
 ActiveSelection.Shapes(1).Fill.ApplyUniformFill c
End Sub
Sub CreateColor3()
 ActiveShape.Fill.UniformColor.CMYKAssign 100, 0, 0 ,0
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.