Word VBA教程:Texture属性

该属性返回或设置指定对象的底纹样式。WdTextureIndex,可读写。

WdTextureIndex 可以是下列 WdTextureIndex 常量之一:
wdTexture10Percent
wdTexture12Pt5Percent
wdTexture15Percent
wdTexture17Pt5Percent
wdTexture20Percent
wdTexture22Pt5Percent
wdTexture25Percent
wdTexture27Pt5Percent
wdTexture2Pt5Percent
wdTexture30Percent
wdTexture32Pt5Percent
wdTexture35Percent
wdTexture37Pt5Percent
wdTexture40Percent
wdTexture42Pt5Percent
wdTexture45Percent
wdTexture47Pt5Percent
wdTexture50Percent
wdTexture52Pt5Percent
wdTexture55Percent
wdTexture57Pt5Percent
wdTexture5Percent
wdTexture60Percent
wdTexture62Pt5Percent
wdTexture65Percent
wdTexture67Pt5Percent
wdTexture70Percent
wdTexture72Pt5Percent
wdTexture75Percent
wdTexture77Pt5Percent
wdTexture7Pt5Percent
wdTexture80Percent
wdTexture82Pt5Percent
wdTexture85Percent
wdTexture87Pt5Percent
wdTexture90Percent
wdTexture92Pt5Percent
wdTexture95Percent
wdTexture97Pt5Percent
wdTextureCross
wdTextureDarkCross
wdTextureDarkDiagonalCross
wdTextureDarkDiagonalDown
wdTextureDarkDiagonalUp
wdTextureDarkHorizontal
wdTextureDarkVertical
wdTextureDiagonalCross
wdTextureDiagonalDown
wdTextureDiagonalUp
wdTextureHorizontal
wdTextureNone
wdTextureSolid
wdTextureVertical

expression.Texture

expression   必需。该表达式返回一个Shading对象。

VBA示例

本示例将活动文档的第一段设为一个区域,然后将网格底纹应用于该区域。


Set myRange = ActiveDocument.Paragraphs(1).Range
myRange.Shading.Texture = wdTextureCross

本示例在插入点添加一个表格,然后将竖线底纹应用于表格中的第一行。


Selection.Collapse Direction:=wdCollapseStart
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
    NumRows:=2, NumColumns:=2)
myTable.Rows(1).Shading.Texture = wdTextureVertical

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


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

Word VBA教程

Word VBA参考教程:目录1 Word VBA参考教程:目录2
Word VBA参考教程:目录3 Word VBA参考教程:目录4
Word VBA参考教程:目录5 Word VBA参考教程:目录6
Word VBA参考教程:目录7 Word VBA参考教程:目录8
Word VBA参考教程:目录9 Word VBA参考教程:目录10
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号