Shading 对象

         
多种对象
Shading

包含某一对象的底纹属性。

使用 Shading 对象

Shading 属性可返回 Shading 对象。下例为活动文档首段设置灰色底纹。

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

下例用不同的前景和背景颜色为选定部分设置底纹。

With Selection.Shading
    .Texture = wdTexture20Percent
    .ForegroundPatternColorIndex = wdBlue
    .BackgroundPatternColorIndex = wdYellow
End With

下例为活动文档中第一张表格的首行设置竖线纹理。

ActiveDocument.Tables(1).Rows(1).Shading.Texture = _
    wdTextureVertical