marginWidth Property

Microsoft FrontPage Visual Basic

marginWidth Property

Returns or sets a Variant that represents the width of the left and right margins for an IFRAME element.

expression.marginWidth

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

Remarks

The value of the marginWidth property can be a String that contains a number that represents the width of the margins followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). Alternatively, you can specify an Integer that represents the width of the margins in pixels.

For example, the following two code samples both set the width of the left and right margins of a IFRAME element to 10 pixels.

    marginWidth = "10px"
marginWidth = 10
  

Example

The following example sets the margin height and width and the source file for the specified IFRAME element.

    Dim objIFrame As FPHTMLIFrame
Set objIFrame = ActiveDocument.body.all.tags("iframe").Item(0)
    
With objIFrame
    .marginHeight = "10px"
    .marginWidth = "10px"
    .src = strSource
End With