ColorCMYK.SetCMYK method (Publisher)
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
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. |
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for