CustomLabel.TopMargin property (Word)
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.
Syntax
expression.TopMargin
expression Required. A variable that represents a CustomLabel object.
Example
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"
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for