Vertical Property

Microsoft Word Visual Basic

Vertical Property

       

True vertically orients text on Asian envelopes and mailing labels. Read/write Boolean.

expression.Vertical

expression   Required. An expression that returns one of the objects in the Applies To list.

Remark

This property works only with mailing labels or envelopes that are set up for a mail merge and applies only to Asian languages.

Example

This example determines if the active document is a mail merge mailing label document and if the language setting is Japanese, and if so, sets the mailing label's orientation to vertical.

Sub VerticalLabel()
    If ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels And
        Application.Language = msoLanguageIDJapanese Then
            Application.MailingLabel.Vertical = True
    End If
End Sub

This example determines if the active document is a mail merge envelope document and if the language setting is Chinese, and if so, sets the envelope's orientation to vertical and updates the current document.

Sub VerticalEnvelope()
    If ActiveDocument.MailMerge.MainDocumentType = wdEnvelopes And
        Application.Language = msoLanguageIDChineseHongKong Then
            With ThisDocument.Envelope
                .Vertical = True
                .UpdateDocument
            End With
    End If
End Sub