backgroundRepeat Property
Returns or sets a String that represents how a background image tiles for an object, such as a document or table. The backgroundRepeat property corresponds to the background-repeat property for a cascading style sheet.
expression.backgroundRepeat
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The backgroundRepeat property and can contain one of the following String values:
repeat |
Image is repeated horizontally and vertically. Default. |
no-repeat |
Image is not repeated. |
repeat-x |
Image is repeated horizontally a specified number of times. |
repeat-y |
Image is repeated vertically a specified number of times. |
You can use the background property to set the backgroundAttachment, backgroundColor, backgroundImage, backgroundPosition, and backgroundRepeat properties. The following code shows what the example below would look like if you were using the background property to set each of these properties.
ActiveDocument.body.Style.Background = "fixed " & _
"url(graphics/chelan.jpg) blue top center no-repeat"
Example
The following example sets the background color and image settings for the active document.
With ActiveDocument.body.Style
.backgroundAttachment = "fixed"
.backgroundImage = "graphics/chelan.jpg"
.backgroundColor = "blue"
.backgroundPosition = "top center"
.backgroundRepeat = "no-repeat"
End With