DefaultSize Property
Applies To
Envelope object.
Description
Returns or sets the default envelope size. Read/write String.
Note The string that's returned corresponds to the right-hand side of the string that appears in the Envelope Size box in the Envelope Options dialog box. If you set either the DefaultHeight or DefaultWidth property, the envelope size is automatically changed to Custom Size in the Envelope Options dialog box (Tools menu) and this property returns "Custom size."
See Also
DefaultHeight property, DefaultWidth property.
Example
This example sets the default envelope size to C4 (229 x 324 mm).
ActiveDocument.Envelope.DefaultSize = "C4"
This example asks the user whether or not they want to change the default envelope size to Size 10. If the answer is yes, the default size is changed accordingly. The UpdateDocument method changes the envelope size for the active document. If an envelope has not been added to the active document, a message box is displayed.
On Error GoTo errhandler
response = MsgBox("Do you want to set the default envelope to Size 10?", 4)
If response = vbYes Then
With ActiveDocument.Envelope
.DefaultSize = "Size 10"
.UpdateDocument
End With
End If
errhandler:
If Err = 5852 Then MsgBox "An envelope isn't part of this document"