Table of contents
Collapse the table of content
Expand the table of content

PictureFormat.IsTrueColor Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Returns an MsoTriState constant indicating whether the specified picture or OLE object contains color data of 24 bits per channel or greater. Read-only.


expression. IsTrueColor

_expression_A variable that represents an PictureFormat object.

Return Value



For pictures that are not TrueColor, use the ColorsInPalette property of the PictureFormat object to determine the number of colors in the picture's palette.

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

msoFalseThe specified picture does not contain color data of 24 bits per channel or greater.
msoTriStateMixedReturn value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTrueThe specified picture contains color data of 24 bits per channel or greater.


The following example tests each picture in the active document and prints whether the picture is TrueColor. If it is not TrueColor, the example prints how many colors are in the picture's palette.

For Each pgLoop In ActiveDocument.Pages 
 For Each shpLoop In pgLoop.Shapes 
 If shpLoop.Type = pbLinkedPicture Or shpLoop.Type = pbPicture Then 

 With shpLoop.PictureFormat 
 If .IsEmpty = msoFalse Then 
 Debug.Print .Filename 
 If .IsTrueColor = msoTrue Then 
 Debug.Print "This picture is TrueColor" 
 Debug.Print "This picture contains " &; .ColorsInPalette &; " colors." 
 End If 
 End If 
 End With 

 End If 
 Next shpLoop 
Next pgLoop 
© 2018 Microsoft