Share via


MailingLabel Object

Word Developer Reference

Represents a mailing label.

Remarks

Use the MailingLabel property to return the MailingLabel object. The following example sets default mailing label options.

Visual Basic for Applications
  With Application.MailingLabel
    .DefaultLaserTray = wdPrinterLowerBin
    .DefaultPrintBarCode = True
End With

Use the PrintOut method to print a mailing label listed in the Product Number box in the Label Options dialog box. The following example prints a page of Avery 5162 standard address labels using the specified address.

Visual Basic for Applications
  addr = "Katie Jordan" & vbCr & "123 Skye St." _
    & vbCr & "OurTown, WA 98107"
Application.MailingLabel.PrintOut Name:="5162", Address:=addr

Use the CustomLabels property to format or print a custom mailing label. The following example sets the number of labels across and down for the custom label named "MyLabel."

Visual Basic for Applications
  With Application.MailingLabel.CustomLabels("MyLabel")
    .NumberAcross = 2
    .NumberDown = 5
End With

See Also