AvailableLabels Property

Microsoft Publisher Visual Basic

AvailableLabels Property

Returns the collection of Label objects that represent each unique label design available on the system. Read-only.

expression.AvailableLabels

expression    Required. An expression that returns a PageSetup object.

Remarks

The Labels collection contains the members returned by the AvailableLabels property.

Members of the AvailableLabels collection are identical to the list of labels available from the Page Setup dialog box.

Example

The following example returns the fifth label available on the system by using AvailableLabels(index), and then some of the label's properties are set.

Dim theLabel As Label

With ActiveDocument.PageSetup
    .Label = .AvailableLabels(5)  ' Label 5 is Avery 5164
    Set theLabel = .Label
    With theLabel
        .LeftMargin = InchesToPoints(0.15)
        .TopMargin = InchesToPoints(0.15)
        .HorizontalGap = InchesToPoints(0.1)
        .VerticalGap = InchesToPoints(0.1)
    End With
End With