Shadow Property

Microsoft Publisher Visual Basic

MsoTrue if the specified font is formatted as shadowed. Read/write MsoTriState.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse
msoTriStateMixed
msoTriStateToggle
msoTrue

expression.Shadow

expression    Required. An expression that returns one of the above objects.

ShowShadow property as it applies to the Shape and ShapeRange objects.

Returns a ShadowFormat object that represents the shadow formatting for the specified shape.

expression.Shadow

expression    Required. An expression that returns one of the above objects.

Example

ShowAs it applies to the Font object.

This example applies shadow and bold formatting to the selection. This example assumes text is selected in the active publication.

Sub SetFontShadow()
    If Selection.Type = pbSelectionText Then
        With Selection.TextRange.Font
            .Shadow = msoTrue
            .Bold = msoTrue
        End With
    Else
        MsgBox "You need to select some text."
    End If
End Sub
				

ShowAs it applies to the Shape and ShapeRange objects.

This example adds an arrow with shadow formatting and fill color to the first page in the active document.

Sub SetShapeShadow()
    With ActiveDocument.Pages(1).Shapes.AddShape( _
            Type:=msoShapeRightArrow, Left:=72, _
            Top:=72, Width:=64, Height:=43)
        .Shadow.Type = msoShadow5
        .Fill.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=255)
    End With
End Sub