Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.65 KB

Word.MailingLabel.CustomLabels.md

File metadata and controls

67 lines (43 loc) · 1.65 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
MailingLabel.CustomLabels property (Word)
vbawd10.chm152502280
vbawd10.chm152502280
Word.MailingLabel.CustomLabels
c4bad9e7-8da9-d469-4d49-a3b43c5cc4de
06/08/2017
medium

MailingLabel.CustomLabels property (Word)

Returns a CustomLabels collection that represents the available custom mailing labels. Read-only.

Syntax

expression. CustomLabels

expression A variable that represents a 'MailingLabel' object.

Remarks

For information about returning a single member of a collection, see Returning an object from a collection.

Example

This example creates a new custom label named "AdminAddress" and then creates a page of mailing labels using a predefined return address.

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

See also

MailingLabel Object

[!includeSupport and feedback]