共用方式為


在 Word) (著色物件

包含物件的網底屬性。

註解

使用 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

屬性

名稱
Application
BackgroundPatternColor
BackgroundPatternColorIndex
Creator
ForegroundPatternColor
ForegroundPatternColorIndex
Parent
Texture

請參閱

Word 物件模型參考資料

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應