Share via


clear Property

Returns or sets a String that represents whether the object allows floating objects on its left and/or right sides, so that the next line of text is displayed past the floating objects.

expression.clear

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

Remarks

The String for the clear property can be one of the following values:

none Floating objects are allowed on both sides.
left Object is moved below any floating object on the left side.
right Object is moved below any floating object on the right side.
both Object is moved below any floating object.

Example

The following example inserts a new paragraph into the active document before the closing BODY element and sets the clear attribute to allow floating objects to be displayed on the right side of the paragraph.

Sub SetClearProperty()
    Dim objPara As FPHTMLParaElement
    
    ActiveDocument.body.insertAdjacentHTML where:="beforeend", _
        HTML:="<p id=""newpara"">Test paragraph</p>"
        
    Set objPara = ActiveDocument.body.all.tags("P").Item("newpara")

    objPara.Clear = "right"
End Sub

Applies to | FPHTMLBlockElement Object | FPHTMLBRElement Object | FPHTMLHeaderElement Object | FPHTMLParaElement Object | FPHTMLStyle Object | IHTMLBlockElement Object | IHTMLBRElement Object | IHTMLRuleStyle Object | IHTMLStyle Object