EnterColorMode Method [Publisher 2003 VBA Language Reference]
Accesses the color mode for the publication.
expression.EnterColorMode(Mode, Plates)
expression Required. An expression that returns one of the objects in the Applies To list.
PbColorMode
PbColorMode can be one of these PbColorMode constants. |
pbColorModeBW |
pbColorModeDesktop |
pbColorModeProcess |
pbColorModeSpot |
pbColorModeSpotAndProcess |
Plates Optional Variant. The plates associated with the color mode. Plates are ignored if the color mode is set to pbColorModeDesktop.
Remarks
You can only enter one of the color modes specified by the Mode argument for each publication. Therefore, if you write a procedure to enter the spot color mode and then write another procedure to enter the black-and-white color mode, only the first procedure executed will run correctly.
Example
This example creates a spot-color plate collection, adds two plates to it, and then enters those plates into the spot color mode.
Sub CreateSpotColorMode()
Dim plArray As Plates
'Creates a color plate collection,
'which contains one black plate by default
Set plArray = ThisDocument.CreatePlateCollection(Mode:=pbColorModeSpot)
'Sets the plate color to red
plArray(1).Color.RGB = RGB(255, 0, 0)
'Adds another plate, black by default and
'sets the plate color to green
plArray.Add
plArray(2).Color.RGB = RGB(0, 255, 0)
'Enters spot-color mode with above
'two plates in the plates array
ThisDocument.EnterColorMode Mode:=pbColorModeSpot, Plates:=plArray
End Sub
Applies to | Document Object