Shading.Texture Property

Word Developer Reference

Returns or sets the shading texture for the specified object. Read/write WdTextureIndex.

Syntax

expression.Texture

expression   Required. A variable that represents a Shading object.

Example

This example sets a range that references the first paragraph in the active document and then applies a grid texture to that range.

Visual Basic for Applications
  Set myRange = ActiveDocument.Paragraphs(1).Range
myRange.Shading.Texture = wdTextureCross

This example adds a table at the insertion point and then applies a vertical line texture to the first row in the table.

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

This example applies 10 percent shading to the first word in the active document.

Visual Basic for Applications
  ActiveDocument.Words(1).Shading.Texture = wdTexture10Percent

See Also