Page 65 - Excel Progamming Weekend Crash Course
P. 65

d540629 ch03.qxd  9/2/03  9:27 AM  Page 40




                40                                                            Friday Evening


                   Subject. Optional argument specifying the message subject. If omitted, the name
                   of the workbook is used as the message subject.
                   ReturnReceipt. If True, a return receipt is requested. Optional; the default is False.
                  A message recipient can be specified either as an explicit e-mail address, or as the name
               of an entry in the address book. If there is only one message recipient, pass the recipient’s
               name or the address itself as the argument:

                  WB.SendMail recipients:=”George Bush”
                  For more than one recipient, create an array containing one entry for each recipient;
               then pass the array as the method argument:

                  Dim recip As Variant
                  recip = Array(“George Bush”, “someone@somewhere.com”, “Bill Gates”)
                  WB.SendMail recipients:=recip



               Other Workbook Methods and Properties
               The Workbook object has a large number of properties and methods — too many to cover in
               this book. Many of these members are rarely used, but in any case you can use the online
               documentation to find the details. A few of these members are needed on a regular basis,
               and are summarized in Table 3-1. Refer to online help for more details on how to use these.


               Table 3-1 Additional Members of the Workbook Object
               Name                Property or Method   Description
               ActiveSheet         Property             Returns a reference to the active sheet

               Charts              Property             Returns a Sheets collection containing a
                                                        Sheet object for every chart sheet in the
                                                        workbook
               CreateBackup        Property             If True, a backup is created when the work-
                                                        book is saved.

               FullName            Property             The full name (path and filename) of the
                                                        workbook

               HasPassword         Property             True if the workbook is password-protected
               HasRoutingSlip      Property             True if there is a routing slip attached to
                                                        the workbook

               Path                Property             The path of the workbook file
   60   61   62   63   64   65   66   67   68   69   70