floatVal Property

Microsoft FrontPage Visual Basic

floatVal Property

Returns or sets a String that represents the side of the object on which the text will flow. Corresponds to the float attribute of a cascading style sheet.

expression.floatVal

expression    Required. An expression that returns an IFPStyleState object.

Remarks

The String value floatVal property can be one of the following:

Value Description
none Object displays where it appears in the text. Default.
left Text flows to the right of the object.
right Text flows to the left of the object .
inherit Object inherits setting from the parent element.

Use the floatVal property to set the float attribute for all textual elements, such as form elements and text ranges. Use the styleFloat property for all other elements.

Example

The following example inserts a DIV element around the current selection in the document and specifies that text will flow along the left side.

    Dim objStyle As IFPStyleState
Dim objRange As IHTMLTxtRange

Set objStyle = ActiveDocument.createStyleState
Set objRange = ActiveDocument.Selection.createRange
objStyle.gather objRange

objStyle.floatVal = "left"
objStyle.Apply