title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
ColorCMYK.SetCMYK method (Publisher) |
vbapb10.chm2621447 |
|
|
9c7ec18b-73e9-66bc-57f4-cd6d62817630 |
06/06/2019 |
medium |
Sets a cyan-magenta-yellow-black (CMYK) color value.
expression.SetCMYK (Cyan, Magenta, Yellow, Black)
expression A variable that represents a ColorCMYK object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Cyan | Required | Long | A number that represents the cyan component of the color. Value can be any number between 0 and 255. |
Magenta | Required | Long | A number that represents the magenta component of the color. Value can be any number between 0 and 255. |
Yellow | Required | Long | A number that represents the yellow component of the color. Value can be any number between 0 and 255. |
Black | Required | Long | A number that represents the black component of the color. Value can be any number between 0 and 255. |
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
[!includeSupport and feedback]