MailingLabel object (Word)

Represents a mailing label.

Remarks

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

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.

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."

With Application.MailingLabel.CustomLabels("MyLabel") 
 .NumberAcross = 2 
 .NumberDown = 5 
End With

See also

Word Object Model Reference

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.