Export (0) Print
Expand All

Document.EnterColorMode Method

Office 2007
Accesses the color mode for the publication.

Syntax

expression.EnterColorMode(Mode, Plates, DeleteExcessInks)

expression   A variable that represents a Document object.

Parameters

NameRequired/OptionalData TypeDescription
ModeRequiredPbColorModeThe color mode.
PlatesOptionalVariantThe plates associated with the color mode. Plates are ignored if the color mode is set to pbColorModeDesktop.
DeleteExcessInksOptionalBoolean

Remarks

The Mode parameter can be one of the following PbColorMode constants declared in the Microsoft Office 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.

Visual Basic for Applications
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



Community Additions

ADD
Show:
© 2014 Microsoft