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"