marginHeight Property
Returns or sets a Variant that represents the height of the top and bottom margins for an IFRAME element.
expression.MarginHeight
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The value of the marginHeight 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 height of the margins in pixels.
For example, the following two code samples both set the height of the top and bottom margins of an IFRAME element to 10 pixels.
marginHeight = "10px"
marginHeight = 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
Applies to | FPHTMLFrameBase Object | FPHTMLFrameElement Object | FPHTMLIFrame Object | IHTMLFrameBase Object