This example asks the user whether envelopes are fed into the printer manually. If the answer is yes, the example sets the paper tray to manual envelope feed.
response = MsgBox("Are the envelopes manually fed?", vbYesNo)
If response = vbYes then
On Error GoTo errhandler
ActiveDocument.Envelope.FeedSource = _
wdPrinterManualEnvelopeFeed
errhandler:
If Err = 5852 Then MsgBox _
"Envelope not part of the active document"
End If