Document.EnterColorMode Method (Publisher)
Accesses the color mode for the publication.
Syntax
expression .EnterColorMode(Mode, Plates, DeleteExcessInks)
expression A variable that represents a Document object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Mode |
Required |
PbColorMode |
The color mode. |
Plates |
Optional |
Variant |
The plates associated with the color mode. Plates are ignored if the color mode is set to pbColorModeDesktop. |
DeleteExcessInks |
Optional |
Boolean |
Remarks
The Mode parameter can be one of the following PbColorMode constants declared in the Microsoft Publisher type library.
pbColorModeBW |
pbColorModeDesktop |
pbColorModeProcess |
pbColorModeSpot |
pbColorModeSpotAndProcess |
You can enter only 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