Microsoft KB Archive/51071

{| = Excel: Using the SEND.MAIL Function in 2.20 =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q51071

SUMMARY
When the SEND.MAIL function is executed from a Microsoft Excel version 2.20 macro, the active Excel screen (worksheet, macro sheet, or chart) becomes an enclosure for the mail message. Pages 278-279 in the &quot;Microsoft Excel Functions and Macros&quot; version 2.2 manual incorrectly describe the arguments for the SEND.MAIL function; the recipients and subject must be enclosed in quotation marks, as described below.

Function
=SEND.MAIL(recipients,subject,return_receipt)

Arguments
Recipients --

An array of names enclosed in quotation marks. If the macro is  sending to more than one recipient, commas are used to separate each recipient name, and the group of names is surrounded by braces (for example, {&quot;Name 1&quot;,&quot;Name 2&quot;,&quot;Name 3&quot;}). The server in which each recipient resides can be distinguished by including a &quot;@server name&quot; after the recipient's name. This server name distinction is  important when trying to send a message to same-named recipients that reside on different servers.

Subject ---

A text argument enclosed in quotation marks. If the subject is  omitted, the name of the Excel file being sent is used as the subject.

Return_Receipt --

Specifies whether the Return Receipt check box is turned on or off. If return_receipt is TRUE, the check box is checked; otherwise, it  is not checked. If the return_receipt argument is not given, it is  assumed to be FALSE.

For example, if you want to send a worksheet called &quot;Forecasted Sales&quot; from a macro with return receipt to Craig and Bob on the server named &quot;Marketing&quot; and to Bob on the server named &quot;Sales&quot;, you could use the following macro function:

=OPEN(&quot;Forecasted Sales&quot;) =SEND.MAIL({&quot;Craig, Bob@Marketing, Bob@Sales&quot;},&quot;Forecasted Sales&quot;,TRUE) =RETURN
 * }