Etudes for Microsoft Word Programmers. Appendix.


Information on this page is from Microsoft MSDN http://msdn.microsoft.com.

Shading (Word 2003)

Object Shading

Contains shading attributes for an object.

Using the Shading Object

Use the Shading property to return the Shading object. The following example applies fine gray shading to the first paragraph in the active document.

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

The following example applies shading with different foreground and background colors to the selection.

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

The following example applies a vertical line texture to the first row in the first table in the active document.

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

Shading Object Properties

Shading object properties are described in the following table.

Property

Type

Description

BackgroundPatternColor

Read/write
WdColor constant

Returns or sets the 24-bit color that's applied to the background of the Shading object. Can be any valid WdColor constant or a value returned by Visual Basic's RGB function.

BackgroundPatternColor Index

Read/write WdColorIndex

Returns or sets the color that's applied to the background of the Shading object.

ForegroundPatternColor

Read/write
WdColor constant

Returns or sets the 24-bit color that's applied to the foreground of the Shading object. This color is applied to the dots and lines in the shading pattern. Can be any valid WdColor constant or a value returned by Visual Basic's RGB function.

ForegroundPatternColor Index

Read/write WdColorIndex

Returns or sets the color that's applied to the foreground of the Shading object. This color is applied to the dots and lines in the shading pattern.

Texture

Read/write WdTextureIndex

Returns or sets the shading texture for the specified object.

Enumeration WdTextureIndex

Enumeration WdTextureIndex определяет тип текстуры.

Constant Value Constant Value Constant Value
wdTexture10Percent 100 wdTexture52Pt5Percent 525 wdTexture92Pt5Percent 925
wdTexture12Pt5Percent 125 wdTexture55Percent 550 wdTexture95Percent 950
wdTexture15Percent 150 wdTexture57Pt5Percent 575 wdTexture97Pt5Percent 975
wdTexture17Pt5Percent 175 wdTexture5Percent 50 wdTextureCross -11
wdTexture20Percent 200 wdTexture60Percent 600 wdTextureDarkCross -5
wdTexture22Pt5Percent 225 wdTexture62Pt5Percent 625 wdTextureDarkDiagonalCross -6
wdTexture25Percent 250 wdTexture65Percent 650 wdTextureDarkDiagonalDown -3
wdTexture27Pt5Percent 275 wdTexture67Pt5Percent 675 wdTextureDarkDiagonalUp -4
wdTexture2Pt5Percent 25 wdTexture70Percent 700 wdTextureDarkHorizontal -1
wdTexture30Percent 300 wdTexture72Pt5Percent 725 wdTextureDarkVertical -2
wdTexture32Pt5Percent 325 wdTexture75Percent 750 wdTextureDiagonalCross -12
wdTexture35Percent 350 wdTexture77Pt5Percent 775 wdTextureDiagonalDown -9
wdTexture37Pt5Percent 375 wdTexture7Pt5Percent 75 wdTextureDiagonalUp -10
wdTexture40Percent 400 wdTexture80Percent 800 wdTextureHorizontal -7
wdTexture42Pt5Percent 425 wdTexture82Pt5Percent 825 wdTextureNone 0
wdTexture45Percent 450 wdTexture85Percent 850 wdTextureSolid 1000
wdTexture47Pt5Percent 475 wdTexture87Pt5Percent 875 wdTextureVertical -8
wdTexture50Percent 500 wdTexture90Percent 900    

 


Etudes for Microsoft Word Programmers. Appendix. Object Shading.


Unless otherwise noted, all materials on this site are
© 2000-2009 Evgeny Akhundzhanov, All Rights Reserved Worldwide
Microsoft is in no way affiliated with, nor offers endorsement of, this site.
www.transcriber.ru | E-mail the Author