Shading 属性

       

返回一个 Shading 对象,该对象指明指定对象的底纹格式。

expression.Shading

expression   必需。该表达式返回“应用于”列表中的一个对象。

示例

本示例为所选内容的第一段设置黄色底纹。

With Selection.Paragraphs(1).Shading
    .Texture = wdTexture12Pt5Percent
    .BackgroundPatternColorIndex = wdYellow
    .ForegroundPatternColorIndex = wdBlack
End With

本示例为表格 1 的第一行设置水平线底纹。

If ActiveDocument.Tables.Count >= 1 Then
    With ActiveDocument.Tables(1).Rows(1).Shading
        .Texture = wdTextureHorizontal
    End With
End If

本示例将活动文档的第一个单词的底纹设置为 10%。

ActiveDocument.Words(1).Shading.Texture = wdTexture10Percent