Share via


PictureFormat.HasTransparencyColor Property

Publisher Developer Reference

Returns a Boolean that indicates whether a transparency color has been applied to the specified picture. Read-only.

Syntax

expression.HasTransparencyColor

expression   A variable that represents a PictureFormat object.

Return Value
Boolean

Example

The following example returns a list of the pictures with transparency colors in the active publication.

Visual Basic for Applications
  Sub ListPicturesWithTransColors()
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 Then
                    If .<strong>HasTransparencyColor</strong> = True Then
                        Debug.Print .Filename
                    End If
                End If
            End With
        
        End If
    
    Next shpLoop
Next pgLoop

End Sub

See Also