Syntax
ToolsCreateEnvelope [.ExtractAddress = number] [, .EnvAddress = text] [, .EnvOmitReturn = number] [, .EnvReturn = text] [, .PrintBarCode = number] [, .EnvWidth = number or text] [, .EnvHeight = number or text] [, .EnvPaperSize = number] [, .PrintFIMA = number] [, .LabelAutoText = text] [, .UseEnvFeeder = number] [, .AddrFromLeft = number or text] [, .AddrFromTop = number or text] [, .RetAddrFromLeft = number or text] [, .RetAddrFromTop = number or text] [, .PrintEnvLabel] [, .AddToDocument]
Remarks
Creates an envelope that is printed with the active document. The arguments for the ToolsCreateEnvelope statement correspond to the options on the Envelopes tab in the Envelopes And Labels dialog box (Tools menu). To specify address formatting, use FormatAddrFonts and FormatRetAddrFonts.
Argument | Explanation | |
.ExtractAddress | Specifies whether or not to use the text marked by the "EnvelopeAddress" bookmark (a user-defined bookmark) as the recipient's address: 0 (zero) The "EnvelopeAddress" bookmark is not used. 1 The "EnvelopeAddress" bookmark is used. | |
.EnvAddress | Text specifying the recipient's address (ignored if .ExtractAddress is specified). | |
.EnvOmitReturn | Specifies whether or not to omit the return address: 0 The return address is not omitted. 1 The return address is omitted. | |
.EnvReturn | Text specifying the return address. | |
.PrintBarCode | Specifies whether or not to add a POSTNET bar code: 1 adds the bar code, 0 (zero) does not. For U.S. mail only. |
Argument | Explanation | |
.EnvWidth, .EnvHeight | The width and height of the envelope, in points or a text measurement, when .EnvPaperSize corresponds to Custom Size. | |
.EnvPaperSize | Corresponds to a size in the Envelope Size box in the Envelope Options dialog box: 0 (zero) corresponds to the first size, 1 to the second size, and so on. | |
.PrintFIMA | Specifies whether or not to add a Facing Identification Mark (FIM A) for use in presorting courtesy reply mail: 1 adds the FIM A, 0 (zero) does not. For U.S. mail only. | |
.LabelAutoText | The name of an AutoText entry in which the address fields for a data source are stored (only recorded when creating envelopes in a mail merge). | |
.UseEnvFeeder | A number corresponding to the envelope source listed in the Feed From box: 0 (zero) corresponds to the first source, 1 to the second source, and so on. | |
.AddrFromLeft | The distance, in the current default unit or a text measurement, between the left edge of the envelope and the recipient's address. | |
.AddrFromTop | The distance, in the current default unit or a text measurement, between the top edge of the envelope and the recipient's address. | |
.RetAddrFromLeft | The distance, in the current default unit or a text measurement, between the left edge of the envelope and the return address. | |
.RetAddrFromTop | The distance, in the current default unit or a text measurement, between the top edge of the envelope and the return address. | |
.PrintEnvLabel | Prints the envelope. | |
.AddToDocument | Adds a section with the recipient's address and the return address to the beginning of the document. |
Example
This example adds an envelope to the active document with addresses specified in the variables to$ and from$. The recipient's address is bold.
rtn$ = Chr$(13) to$ = "Jane Doe" + rtn$ + "123 Skye St." + \ rtn$ + "OurTown, WA 98107" from$ = "John Doe" + rtn$ + "456 Erde Lane" + \ rtn$ + "OurTown, WA 98107" FormatAddrFonts .Bold = 1 ToolsCreateEnvelope .EnvAddress = to$, .EnvReturn = from$, \ .AddToDocument
See Also
FormatAddrFonts, FormatRetAddrFonts, ToolsCreateLabels