Shading.Texture property (Word)

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.

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.

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.

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

See also

Shading Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.