CustomLabel.Valid Property

Word Developer Reference

True if the various properties (for example, Height, Width, and NumberDown) for the specified custom label work together to produce a valid mailing label. Read-only Boolean.

Syntax

expression.Valid

expression   A variable that represents a CustomLabel object.

Example

If the settings for the custom label named "My Labels" are valid, this example creates a new document of labels using the My Labels settings.

Visual Basic for Applications
  addr = "James Allard" & vbCr & "123 Main St." & vbCr _
    & "Seattle, WA 98040"
If Application.MailingLabel.CustomLabels("My Labels") _
        .Valid = True Then    Application.MailingLabel.CreateNewDocument _
        Name:="My Labels", Address:=addr
End If

See Also