topMargin Property

Microsoft FrontPage Visual Basic

topMargin Property

Sets or returns a String that represents the number of pixels for the top margin of the page.

expression.topMargin

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

Example

The following example sets the bottom, top, left, and right margins to 50 pixels.

    Sub SetMargins()
    Dim objBody As FPHTMLBody
    
    Set objBody = ActiveDocument.body
    
    With objBody
        .bottomMargin = "50"
        .leftMargin = "50"
        .rightMargin = "50"
        .topMargin = "50"
    End With
End Sub