TopMargin Property

Applies To

CustomLabel object, PageSetup object.

Description

Returns or sets the distance (in points) between the top edge of the page and the top boundary of the body text. Read/write Single.

See Also

BottomMargin property, HeaderDistance property, LeftMargin property, MirrorMargins property, RightMargin property, SideMargin property.

Example

This example sets the top margin to 72 points (1 inch) for the first section in the active document.

ActiveDocument.Sections(1).PageSetup.TopMargin = 72
This example creates a new custom label and sets several properties, including the top margin, and then it creates a new document using the custom labels.

Set newlbl = Application.MailingLabel. _
    CustomLabels.Add(Name:="My Label")
With newlbl
    .Height = InchesToPoints(1.25)
    .NumberAcross = 2
    .NumberDown = 7
    .PageSize = wdCustomLabelLetter
    .SideMargin = InchesToPoints(0)
    .TopMargin = InchesToPoints(1)
    .Width = InchesToPoints(4.25)
End With
Application.MailingLabel.CreateNewDocument Name:="My Label"