Index Property

Gets or sets an Integer value, which is an index representation of a color.

Applies to objects: Color

Syntax

[Let] RetVal = object.Index

[Let] object.Index = SetVal

The Index property syntax has these parts:

Part Description
object A reference to an instance of the object.
RetVal An Integer value within the 0 - 255 range.
SetVal An Integer value within the 0 - 255 range.

Remarks

Prior to using the Index property it's recommended that you call the IsIndex property.

Example

This example demonstrates how to find out the fill color index of the Shape object.

dim s as shape

' Create a Shape object
s = thisDoc.ActivePage.DrawRect(100,100,1000,1000)
If s.FillColor.IsIndex <> false Then ' An index color ? trace s.FillColor.Index ' If yes, display its value endif

 

See Also

Color Object, IsIndex Property