TransparencyColor Property

Microsoft Publisher Visual Basic

expression.TransparencyColor

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example creates a picture on the first page and sets the transparency color to black.

Sub SetTransparentColor()
    With ActiveDocument.Pages(1).Shapes.AddPicture( _
            FileName:="C:\My Pictures\Sample.gif", LinkToFile:=msoFalse, _
            SaveWithDocument:=msoTrue, Left:=36, Top:=36)
        .PictureFormat.TransparencyColor = RGB(Red:=255, Green:=255, Blue:=255)
    End With
End Sub