Share via


Envelope.Insert Method 

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

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim ExtractAddress As Object
Dim Address As Object
Dim AutoText As Object
Dim OmitReturnAddress As Object
Dim ReturnAddress As Object
Dim ReturnAutoText As Object
Dim PrintBarCode As Object
Dim PrintFIMA As Object
Dim Size As Object
Dim Height As Object
Dim Width As Object
Dim FeedSource As Object
Dim AddressFromLeft As Object
Dim AddressFromTop As Object
Dim ReturnAddressFromLeft As Object
Dim ReturnAddressFromTop As Object
Dim DefaultFaceUp As Object
Dim DefaultOrientation As Object
Dim PrintEPostage As Object
Dim Vertical As Object
Dim RecipientNamefromLeft As Object
Dim RecipientNamefromTop As Object
Dim RecipientPostalfromLeft As Object
Dim RecipientPostalfromTop As Object
Dim SenderNamefromLeft As Object
Dim SenderNamefromTop As Object
Dim SenderPostalfromLeft As Object
Dim SenderPostalfromTop As Object
Dim envelope1 As Envelope
envelope1.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)

Syntax

Sub Insert( _
    <InAttribute()> Optional ByRef ExtractAddress As Object, _
    <InAttribute()> Optional ByRef Address As Object, _
    <InAttribute()> Optional ByRef AutoText As Object, _
    <InAttribute()> Optional ByRef OmitReturnAddress As Object, _
    <InAttribute()> Optional ByRef ReturnAddress As Object, _
    <InAttribute()> Optional ByRef ReturnAutoText As Object, _
    <InAttribute()> Optional ByRef PrintBarCode As Object, _
    <InAttribute()> Optional ByRef PrintFIMA As Object, _
    <InAttribute()> Optional ByRef Size As Object, _
    <InAttribute()> Optional ByRef Height As Object, _
    <InAttribute()> Optional ByRef Width As Object, _
    <InAttribute()> Optional ByRef FeedSource As Object, _
    <InAttribute()> Optional ByRef AddressFromLeft As Object, _
    <InAttribute()> Optional ByRef AddressFromTop As Object, _
    <InAttribute()> Optional ByRef ReturnAddressFromLeft As Object, _
    <InAttribute()> Optional ByRef ReturnAddressFromTop As Object, _
    <InAttribute()> Optional ByRef DefaultFaceUp As Object, _
    <InAttribute()> Optional ByRef DefaultOrientation As Object, _
    <InAttribute()> Optional ByRef PrintEPostage As Object, _
    <InAttribute()> Optional ByRef Vertical As Object, _
    <InAttribute()> Optional ByRef RecipientNamefromLeft As Object, _
    <InAttribute()> Optional ByRef RecipientNamefromTop As Object, _
    <InAttribute()> Optional ByRef RecipientPostalfromLeft As Object, _
    <InAttribute()> Optional ByRef RecipientPostalfromTop As Object, _
    <InAttribute()> Optional ByRef SenderNamefromLeft As Object, _
    <InAttribute()> Optional ByRef SenderNamefromTop As Object, _
    <InAttribute()> Optional ByRef SenderPostalfromLeft As Object, _
    <InAttribute()> Optional ByRef SenderPostalfromTop As Object _
)
void Insert(
    [In, Optional] ref object ExtractAddress, 
    [In, Optional] ref object Address, 
    [In, Optional] ref object AutoText, 
    [In, Optional] ref object OmitReturnAddress, 
    [In, Optional] ref object ReturnAddress, 
    [In, Optional] ref object ReturnAutoText, 
    [In, Optional] ref object PrintBarCode, 
    [In, Optional] ref object PrintFIMA, 
    [In, Optional] ref object Size, 
    [In, Optional] ref object Height, 
    [In, Optional] ref object Width, 
    [In, Optional] ref object FeedSource, 
    [In, Optional] ref object AddressFromLeft, 
    [In, Optional] ref object AddressFromTop, 
    [In, Optional] ref object ReturnAddressFromLeft, 
    [In, Optional] ref object ReturnAddressFromTop, 
    [In, Optional] ref object DefaultFaceUp, 
    [In, Optional] ref object DefaultOrientation, 
    [In, Optional] ref object PrintEPostage, 
    [In, Optional] ref object Vertical, 
    [In, Optional] ref object RecipientNamefromLeft, 
    [In, Optional] ref object RecipientNamefromTop, 
    [In, Optional] ref object RecipientPostalfromLeft, 
    [In, Optional] ref object RecipientPostalfromTop, 
    [In, Optional] ref object SenderNamefromLeft, 
    [In, Optional] ref object SenderNamefromTop, 
    [In, Optional] ref object SenderPostalfromLeft, 
    [In, Optional] ref object SenderPostalfromTop
);
public: Void Insert(
    &Object^ ExtractAddress, 
    &Object^ Address, 
    &Object^ AutoText, 
    &Object^ OmitReturnAddress, 
    &Object^ ReturnAddress, 
    &Object^ ReturnAutoText, 
    &Object^ PrintBarCode, 
    &Object^ PrintFIMA, 
    &Object^ Size, 
    &Object^ Height, 
    &Object^ Width, 
    &Object^ FeedSource, 
    &Object^ AddressFromLeft, 
    &Object^ AddressFromTop, 
    &Object^ ReturnAddressFromLeft, 
    &Object^ ReturnAddressFromTop, 
    &Object^ DefaultFaceUp, 
    &Object^ DefaultOrientation, 
    &Object^ PrintEPostage, 
    &Object^ Vertical, 
    &Object^ RecipientNamefromLeft, 
    &Object^ RecipientNamefromTop, 
    &Object^ RecipientPostalfromLeft, 
    &Object^ RecipientPostalfromTop, 
    &Object^ SenderNamefromLeft, 
    &Object^ SenderNamefromTop, 
    &Object^ SenderPostalfromLeft, 
    &Object^ SenderPostalfromTop
);
public void Insert(
    /*in*/System.Object ExtractAddress, 
    /*in*/System.Object Address, 
    /*in*/System.Object AutoText, 
    /*in*/System.Object OmitReturnAddress, 
    /*in*/System.Object ReturnAddress, 
    /*in*/System.Object ReturnAutoText, 
    /*in*/System.Object PrintBarCode, 
    /*in*/System.Object PrintFIMA, 
    /*in*/System.Object Size, 
    /*in*/System.Object Height, 
    /*in*/System.Object Width, 
    /*in*/System.Object FeedSource, 
    /*in*/System.Object AddressFromLeft, 
    /*in*/System.Object AddressFromTop, 
    /*in*/System.Object ReturnAddressFromLeft, 
    /*in*/System.Object ReturnAddressFromTop, 
    /*in*/System.Object DefaultFaceUp, 
    /*in*/System.Object DefaultOrientation, 
    /*in*/System.Object PrintEPostage, 
    /*in*/System.Object Vertical, 
    /*in*/System.Object RecipientNamefromLeft, 
    /*in*/System.Object RecipientNamefromTop, 
    /*in*/System.Object RecipientPostalfromLeft, 
    /*in*/System.Object RecipientPostalfromTop, 
    /*in*/System.Object SenderNamefromLeft, 
    /*in*/System.Object SenderNamefromTop, 
    /*in*/System.Object SenderPostalfromLeft, 
    /*in*/System.Object SenderPostalfromTop
);
function Insert(
     ExtractAddress : Object, 
     Address : Object, 
     AutoText : Object, 
     OmitReturnAddress : Object, 
     ReturnAddress : Object, 
     ReturnAutoText : Object, 
     PrintBarCode : Object, 
     PrintFIMA : Object, 
     Size : Object, 
     Height : Object, 
     Width : Object, 
     FeedSource : Object, 
     AddressFromLeft : Object, 
     AddressFromTop : Object, 
     ReturnAddressFromLeft : Object, 
     ReturnAddressFromTop : Object, 
     DefaultFaceUp : Object, 
     DefaultOrientation : Object, 
     PrintEPostage : Object, 
     Vertical : Object, 
     RecipientNamefromLeft : Object, 
     RecipientNamefromTop : Object, 
     RecipientPostalfromLeft : Object, 
     RecipientPostalfromTop : Object, 
     SenderNamefromLeft : Object, 
     SenderNamefromTop : Object, 
     SenderPostalfromLeft : Object, 
     SenderPostalfromTop : Object
);

Parameters

  • ExtractAddress
    Optional Object. True to use the text marked by the EnvelopeAddress bookmark (a user-defined bookmark) as the recipient's address.
  • Address
    Optional Object. A string that specifies the recipient's address (ignored if ExtractAddress is True).
  • AutoText
    Optional Object. A string that specifies an AutoText entry to use for the address. If specified, Address is ignored.
  • OmitReturnAddress
    Optional Object. True to not insert a return address.
  • ReturnAddress
    Optional Object. A string that specifies the return address.
  • ReturnAutoText
    Optional Object. A string that specifies an AutoText entry to use for the return address. If specified, ReturnAddress is ignored.
  • PrintBarCode
    Optional Object. True to add a POSTNET bar code. For U.S. mail only.
  • PrintFIMA
    Optional Object. True to add a Facing Identification Mark (FIMA) for use in presorting courtesy reply mail. For U.S. mail only.
  • Size
    Optional Object. 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 Object. The height of the envelope, measured in points, when the Size argument is set to "Custom size."
  • Width
    Optional Object. The width of the envelope, measured in points, when the Size argument is set to "Custom size."
  • FeedSource
    Optional Object. True to use the FeedSource property of the Envelope object to specify which paper tray to use when printing the envelope.
  • AddressFromLeft
    Optional Object. The distance, measured in points, between the left edge of the envelope and the recipient's address.
  • AddressFromTop
    Optional Object. The distance, measured in points, between the top edge of the envelope and the recipient's address.
  • ReturnAddressFromLeft
    Optional Object. The distance, measured in points, between the left edge of the envelope and the return address.
  • ReturnAddressFromTop
    Optional Object. The distance, measured in points, between the top edge of the envelope and the return address.
  • DefaultFaceUp
    Optional Object. True to print the envelope face up; False to print it face down.
  • DefaultOrientation
    Optional Object. The orientation for the envelope. Can be any WdEnvelopeOrientation constant.
  • PrintEPostage
    Optional Object. True to insert postage from an Internet postage vendor.
  • Vertical
    Optional Object. True to print vertical text on the envelope. Used for Asian envelopes. Default is False.
  • RecipientNamefromLeft
    Optional Object. Position of the recipient's name, measured in points from the left edge of the envelope. Used for Asian envelopes.
  • RecipientNamefromTop
    Optional Object. Position of the recipient's name, measured in points from the top edge of the envelope. Used for Asian envelopes.
  • RecipientPostalfromLeft
    Optional Object. Position of the recipient's postal code, measured in points from the left edge of the envelope. Used for Asian envelopes.
  • RecipientPostalfromTop
    Optional Object. Position of the recipient's postal code, measured in points from the top edge of the envelope. Used for Asian envelopes.
  • SenderNamefromLeft
    Optional Object. Position of the sender's name, measured in points from the left edge of the envelope. Used for Asian envelopes.
  • SenderNamefromTop
    Optional Object. Position of the sender's name, measured in points from the top edge of the envelope. Used for Asian envelopes.
  • SenderPostalfromLeft
    Optional Object. Position of the sender's postal code, measured in points from the left edge of the envelope. Used for Asian envelopes.
  • SenderPostalfromTop
    Optional Object. Position of the sender's postal code, measured in points from the top edge of the envelope. Used for Asian envelopes.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

Envelope Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

Envelope Members