pageContentElement Property

Returns an IHTMLElement object that represents the HTML element containing the contents of the specified document.

expression.pageContentElement

*expression   * Required. An expression that returns one of the objects in the Applies to list.

Remarks

Generally, the element returned by using the pageContentElement property corresponds to the BODY element. Therefore, you can assign the pageContentElement property to an FPHTMLBody or IHTMLBodyElement object without receiving a Type Mismatch error, as shown in the following code:

Dim objBody As IHTMLBodyElement
Set objBody = ActiveDocument.pageContentElement

Example

The following example changes the background color of the active document to aqua.

Dim objBody As FPHTMLBody
Set objBody = ActiveDocument.pageContentElement

objBody.bgColor = "aqua"

Applies to | FPHTMLDocument Object | IFPDocument Object | IFPDocument Object