Microsoft KB Archive/51071

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Excel: Using the SEND.MAIL() Function in 2.20

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 "Microsoft Excel Functions and Macros" 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.

MORE INFORMATION

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, {"Name 1","Name 2","Name 3"}). The server in which
   each recipient resides can be distinguished by including a "@server
   name" 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 "Forecasted
   Sales" from a macro with return receipt to Craig and Bob on the
   server named "Marketing" and to Bob on the server named "Sales",
   you could use the following macro function:

   =OPEN("Forecasted Sales")
   =SEND.MAIL({"Craig, Bob@Marketing, Bob@Sales"},"Forecasted Sales",TRUE)
   =RETURN()

KBCategory: kbdocerr

KBSubcategory:

Additional reference words: 2.20


Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.