返回一个 CustomLabels 集合,该集合代表有效的自定义邮件标签。只读。
有关返回集合中单个成员的内容,请参阅返回集合中的对象。
本示例新建一个名为“AdminAddress”的自定义标签,再用一个预定义寄信人地址创建一页邮件标签。
Dim strAddress As String
Dim labelNew As CustomLabel
strAddress = "Administration" & vbCr & "Mail Stop 22-16"
Set labelNew = Application.MailingLabel _
    .CustomLabels.Add(Name:="AdminAddress", DotMatrix:= False)
With labelNew
    .Height = InchesToPoints(0.5)
    .Width = InchesToPoints(1)
    .HorizontalPitch = InchesToPoints(2.06)
    .VerticalPitch = InchesToPoints(0.5)
    .NumberAcross = 4
    .NumberDown = 20
    .PageSize = wdCustomLabelLetter
    .SideMargin = InchesToPoints(0.28)
    .TopMargin = InchesToPoints(0.5)
End With
Application.MailingLabel.CreateNewDocument _
    Name:="AdminAddress", Address:=strAddress