Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.53 KB

Publisher.ColorCMYK.SetCMYK.md

File metadata and controls

51 lines (36 loc) · 1.53 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ColorCMYK.SetCMYK method (Publisher)
vbapb10.chm2621447
vbapb10.chm2621447
Publisher.ColorCMYK.SetCMYK
9c7ec18b-73e9-66bc-57f4-cd6d62817630
06/06/2019
medium

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

[!includeSupport and feedback]