Table of contents
TOC
Collapse the table of content
Expand the table of content

ColorCMYK.SetCMYK Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Sets a cyan-magenta-yellow-black (CMYK) color value.

Syntax

expression. SetCMYK( Cyan, Magenta, Yellow, Black)

_expression_A variable that represents a ColorCMYK object.

Parameters

NameRequired/OptionalData TypeDescription
CyanRequiredLongA number that represents the cyan component of the color. Value can be any number between 0 and 255.
MagentaRequiredLongA number that represents the magenta component of the color. Value can be any number between 0 and 255.
YellowRequiredLongA number that represents the yellow component of the color. Value can be any number between 0 and 255.
BlackRequiredLongA number that represents the black component of the color. Value can be any number between 0 and 255.

Example

This example sets the CMYK color for the specified shape.

Sub SetCMYKColor() 
 Dim shpStar As Shape 

 Set shpStar = ActiveDocument.Pages(1).Shapes _ 
 .AddShape(Type:=msoShape5pointStar, Left:=72, _ 
 Top:=72, Width:=150, Height:=150) 
 shpStar.Fill.ForeColor.CMYK.SetCMYK Cyan:=0, _ 
 Magenta:=255, Yellow:=255, Black:=50 
End Sub
© 2018 Microsoft