OriginalIsTrueColor Property

Microsoft Publisher Visual Basic

Show All Show All

OriginalIsTrueColor Property

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

MsoTriState can be one of these MsoTriState constants.
msoCTrue Not used with this property.
msoFalse The specified linked picture does not contain color data of 24 bits per channel or greater.
msoTriStateMixed Indicates a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggle Not used with this property.
msoTrue The specified linked picture contains color data of 24 bits per channel or greater.

expression.OriginalIsTrueColor()

expression    Required. An expression that returns a PictureFormat object.

Remarks

This property only applies to linked pictures or OLE objects. Returns "Permission Denied" for shapes representing embedded or pasted pictures and OLE objects.

To determine whether a shape represents a linked picture, use either the Type property of the Shape object, or the IsLinked property of the PictureFormat object.

Example

The following example returns a list of pictures in the active document that are TrueColor. If a picture is linked, and the linked picture is also TrueColor, that information is also returned.

    Sub PictureColorInformation()
Dim pgLoop As Page
Dim shpLoop As Shape

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
                    
                    If .IsTrueColor = msoTrue Then
                        Debug.Print .Filename
                        Debug.Print "This picture is TrueColor"
                        If .IsLinked = msoTrue Then
                            If .OriginalIsTrueColor = msoTrue Then
                                Debug.Print "The linked picture is also TrueColor."
                            End If
                        End If
                    End If
                                                 
                End If
            End With
            
        End If
    Next shpLoop
Next pgLoop

End Sub