Partager via


Envelope.Insert Method (Word)

Inserts an envelope as a separate section at the beginning of the specified document.

Syntax

expression .Insert(ExtractAddress, Address, AutoText, OmitReturnAddress, ReturnAddress, ReturnAutoText, PrintBarCode, PrintFIMA, Size, Height, Width, FeedSource, AddressFromLeft, AddressFromTop, ReturnAddressFromLeft, ReturnAddressFromTop, DefaultFaceUp, DefaultOrientation, PrintEPostage, Vertical, RecipientNamefromLeft, RecipientNamefromTop, RecipientPostalfromLeft, RecipientPostalfromTop, SenderNamefromLeft, SenderNamefromTop, SenderPostalfromLeft, SenderPostalfromTop)

expression Required. A variable that represents an Envelope object.

Parameters

Name

Required/Optional

Data Type

Description

ExtractAddress

Optional

Variant

True to use the text marked by the EnvelopeAddress bookmark (a user-defined bookmark) as the recipient's address.

Address

Optional

Variant

A string that specifies the recipient's address (ignored if ExtractAddress is True).

AutoText

Optional

Variant

A string that specifies an AutoText entry to use for the address. If specified, Address is ignored.

OmitReturnAddress

Optional

Variant

True to not insert a return address.

ReturnAddress

Optional

Variant

A string that specifies the return address.

ReturnAutoText

Optional

Variant

A string that specifies an AutoText entry to use for the return address. If specified, ReturnAddress is ignored.

PrintBarCode

Optional

Variant

True to add a POSTNET bar code. For U.S. mail only.

PrintFIMA

Optional

Variant

True to add a Facing Identification Mark (FIMA) for use in presorting courtesy reply mail. For U.S. mail only.

Size

Optional

Variant

A string that specifies the envelope size. The string must match one of the sizes listed in the Envelope size box in the Envelope Options dialog box (for example, "Size 10" or "C4").

Height

Optional

Variant

The height of the envelope, measured in points, when the Size argument is set to "Custom size."

Width

Optional

Variant

The width of the envelope, measured in points, when the Size argument is set to "Custom size."

FeedSource

Optional

Variant

True to use the FeedSource property of the Envelope object to specify which paper tray to use when printing the envelope.

AddressFromLeft

Optional

Variant

The distance, measured in points, between the left edge of the envelope and the recipient's address.

AddressFromTop

Optional

Variant

The distance, measured in points, between the top edge of the envelope and the recipient's address.

ReturnAddressFromLeft

Optional

Variant

The distance, measured in points, between the left edge of the envelope and the return address.

ReturnAddressFromTop

Optional

Variant

The distance, measured in points, between the top edge of the envelope and the return address.

DefaultFaceUp

Optional

Variant

True to print the envelope face up, False to print it face down.

DefaultOrientation

Optional

Variant

The orientation for the envelope. Can be any WdEnvelopeOrientation constant.

PrintEPostage

Optional

Variant

True to insert postage from an Internet postage vendor.

Vertical

Optional

Variant

True to print vertical text on the envelope. Used for Asian envelopes. Default is False.

RecipientNamefromLeft

Optional

Variant

Position of the recipient's name, measured in points from the left edge of the envelope. Used for Asian envelopes.

RecipientNamefromTop

Optional

Variant

Position of the recipient's name, measured in points from the top edge of the envelope. Used for Asian envelopes.

RecipientPostalfromLeft

Optional

Variant

Position of the recipient's postal code, measured in points from the left edge of the envelope. Used for Asian envelopes.

RecipientPostalfromTop

Optional

Variant

Position of the recipient's postal code, measured in points from the top edge of the envelope. Used for Asian envelopes.

SenderNamefromLeft

Optional

Variant

Position of the sender's name, measured in points from the left edge of the envelope. Used for Asian envelopes.

SenderNamefromTop

Optional

Variant

Position of the sender's name, measured in points from the top edge of the envelope. Used for Asian envelopes.

SenderPostalfromLeft

Optional

Variant

Position of the sender's postal code, measured in points from the left edge of the envelope. Used for Asian envelopes.

SenderPostalfromTop

Optional

Variant

Position of the sender's postal code, measured in points from the top edge of the envelope. Used for Asian envelopes.

Example

This example adds a Size 10 envelope to the active document by using the addresses stored in the strAddr and strReturnAddr variables.

Sub InsertEnvelope() 
 Dim strAddr As String 
 Dim strReturnAddr As String 
 strAddr = "Max Benson" & vbCr & "123 Skye St." _ 
 & vbCr & "OurTown, WA 98107" 
 strReturnAddr = "Paul Borm" & vbCr & "456 Erde Lane" _ 
 & vbCr & "OurTown, WA 98107" 
 ActiveDocument.Envelope.Insert Address:=strAddr, _ 
 ReturnAddress:=strReturnAddr, Size:="Size 10" 
End Sub

See Also

Concepts

Envelope Object

Envelope Object Members