This documentation is archived and is not being maintained.

PictureFormat.IsGreyScale Property

Office 2007
Returns a MsoTriState constant that indicates whether the picture is a greyscale image. Read-only.



expression   A variable that represents an PictureFormat object.

Return Value


The IsGreyScale property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

msoFalseThe picture is not a greyscale image.
msoTriStateMixedIndicates a combination of msoTrue and msoFalse for the specified shape range.
msoTrueThe specified picture is a greyscale image.


The following example returns a list of the greyscale pictures contained in the active publication.

Visual Basic for Applications
Sub ListGreyScalePictures()
Dim pgLoop As Page
Dim shpLoop As Shape

    For Each pgLoop In ActiveDocument.Pages
        For Each shpLoop In pgLoop.Shapes
            If shpLoop.Type = pbPicture Or shpLoop.Type = pbLinkedPicture Then
                With shpLoop.PictureFormat
                    If .IsEmpty = msoFalse And .IsGreyScale = msoCTrue Then
                        Debug.Print .Filename
                        Debug.Print "Page " & pgLoop.PageNumber
                    End If
                End With
            End If
        Next shpLoop
    Next pgLoop

End Sub