TransparentBackground Property

       

Returns or sets an MsoTriState constant indicating whether the parts of the specified picture that are defined as the transparent color appear transparent. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue  Not used with this property.
msoFalse  Parts of the picture whose color is the transparency color do not appear transparent.
msoTriStateMixed  Return value only. Indicates a combination of msoTrue and msoFalse for the specified objects.
msoTriStateToggle  Set value only. Toggles between msoTrue and msoFalse.
msoTrue  Parts of the picture whose color is the transparency color appear transparent.

expression.TransparentBackground

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

Remarks

Use the TransparencyColor property to set the transparent color.

This property applies to bitmaps only.

If you want to be able to see through the transparent parts of the picture all the way to the objects behind the picture, you must set the Visible property of the picture's FillFormat object to mso False. If your picture has a transparent color and the Visible property of the picture's FillFormat object is set to msoTrue, the picture's fill will be visible through the transparent color, but objects behind the picture will be obscured.

Example

This example sets the color blue as the transparent color for shape one in the active publication. For the example to work, shape one must be a bitmap.

With ActiveDocument.Pages(1).Shapes(1)

    With .PictureFormat
        .TransparentBackground = msoTrue
        ' RGB(0, 0, 255) is the color blue.
        .TransparencyColor = RGB(0, 0, 255)
    End With

    .Fill.Visible = False

End With