PictureFormat.TransparencyColor property (Publisher)
Returns or sets an MsoColorType constant that represents the transparency color. Read/write.
Syntax
expression.TransparencyColor
expression A variable that represents a PictureFormat object.
Return value
MsoColorType
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.