Collapse the table of content
Expand the table of content
Expand Minimize

Document.Envelope Property (Word)


Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns an Envelope object that represents an envelope and envelope features in a document. Read-only.

expression .Envelope

expression A variable that represents a Document object.

This example sets the default envelope size to C4 (229 x 324 mm).

ActiveDocument.Envelope.DefaultSize = "C4"

This example displays the delivery address if an envelope has been added to the document; otherwise, a message box is displayed.

On Error GoTo errhandler 
addr = ActiveDocument.Envelope.Address.Text 
MsgBox Prompt:=addr, Title:="Delivery Address" 
If Err = 5852 Then MsgBox "Add an envelope to the document"

This example creates a new document and adds an envelope with a predefined delivery address and return address.

addr = "Don Funk" & vbCr & "123 Skye St." _ 
 & vbCr & "Our Town, WA 98040" 
retaddr = "Karin Gallagher" & vbCr & "123 Main" _ 
 & vbCr & "Other Town, WA 98004" 
Documents.Add.Envelope.Insert Address:=addr, ReturnAddress:=retaddr 
ActiveDocument.ActiveWindow.View.Type = wdPrintView
© 2015 Microsoft