left Property

Microsoft FrontPage Visual Basic

Show All Show All

left Property

ShowAs it applies to the FPHTMLStyle and IHTMLRuleStyle objects.

Returns or sets a Variant that represents the position of the left edge of an element for a cascading style sheet.

expression.left

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

ShowAs it applies to the IFPStyleState object.

Sets or returns an IFPStyleLength object that represents the left edge of an element. Places a DIV element around the specified element.

expression.left

expression    Required. An expression that returns an IFPStyleState object.

Remarks

You must also set the position property of the IFPStyleState object for the left property to take effect for an element.

Example

ShowAs it applies to the IFPStyleState object.

The following example surrounds the first paragraph in the active document with a DIV element positions the left edge of the DIV element 100 pixels from the left edge of the page.

      Dim objStyleState As IFPStyleState
Dim objLeft As IFPStyleLength
Dim rng As IHTMLTxtRange

Set objStyleState = ActiveDocument.createStyleState
Set rng = ActiveDocument.Selection.createRange

objStyleState.gatherFromElement _
    ActiveDocument.all.tags("p").Item(0)

Set objLeft = objStyleState.createStyleLength
objLeft.units = fpLengthUnitsPX
objLeft.Value = 100

objStyleState.Position = "Absolute"
objStyleState.Left = objLeft

objStyleState.Apply