bgProperties Property
Returns or sets a String that represents the properties of the background image.
expression.bgProperties
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value of the bgProperties property can be one of the following values:
"" | Background can scroll. Default. |
fixed | Background is fixed and cannot scroll. |
The bgProperties property is similar to the backgroundAttachment property.
Example
The following example sets the background image for the specified document and specifies the behavior of the background image.
Sub SetBackgroundImageProperties(ByRef objDoc As FPHTMLDocument, _
ByRef strImage As String, Optional ByRef strBehavior As String)
With objDoc.body
.Style.backgroundImage = strImage
.bgProperties = strBehavior
End With
End Sub
Use the following example to call the preceding subroutine. This example assumes that you have an image file called "background.gif."
Sub CallSetBackgroundImageProperties()
Call SetBackgroundImageProperties(objDoc:=ActiveDocument, _
strImage:="background.gif", strBehavior:="scroll")
End Sub
Applies to | FPHTMLBody Object | IHTMLBodyElement Object