DefaultWidth Property

Microsoft Word Visual Basic

DefaultWidth Property

       

Returns or sets the default envelope width, in points. Read/write Single

Note   If you set the DefaultHeight or DefaultWidth property, the envelope size is automatically changed to Custom Size in the Envelope Options dialog box (Tools menu). Use the DefaultSize property to set the default size to a predefined size.

Example

This example sets the default custom envelope width and height and adds an envelope to the active document.

Dim strAddress As String
Dim strReturn As String

strAddress = "Tim O' Brien " & vbCr & "123 Skye St." _
    & vbCr & "Bellevue, WA  98004"
strReturn = "Dave Edson" & vbCr & "123 West Main" _
    & vbCr & "Seattle, WA  98004"

With ActiveDocument.Envelope
    .DefaultWidth = InchesToPoints(9)
    .DefaultHeight = InchesToPoints(3.85)
End With

ActiveDocument.Envelope.Insert _
    Address:=strAddress, ReturnAddress:=strReturn