An AcSendObjectType constant that specifies the type of object to send. If you leave both the ObjectType and ObjectName arguments blank the default constant, acSendNoObject, is assumed for the ObjectType argument , Microsoft Access sends a message to the electronic mail application without an included database object. If you run Visual Basic code containing the SendObject method in a library database, Access looks for the object with this name first in the library database, and then in the current database. OutputFormat Optional Variant A constant that specifies the format in which to send the object. To Optional Variant A string expression that lists the recipients whose names you want to put on the To line in the mail message. Separate the recipient names that you specify in this argument and in the Cc and Bcc arguments with a semicolon ; , or with the list separator set on the Number tab of the Regional Settings Properties dialog box in the Windows Control Panel.
|Published (Last):||14 June 2019|
|PDF File Size:||2.97 Mb|
|ePub File Size:||14.94 Mb|
|Price:||Free* [*Free Regsitration Required]|
To The email address of the recipient or list of recipients for the To line in the mail message. Separate the recipient names with a semicolon ;. If you leave this argument blank, Microsoft Access prompts you for the recipients. Cc The email address es for the CC line in the mail message, if any.
Bcc The email address es for the BCC line in the mail message, if any. Subject Subject line for the mail message. MessageText The text for the body of the mail message, after the object. EditMessage Use True —1 to open the electronic mail application immediately with the message loaded, so the message can be edited.
Use False 0 to send the message without editing it. If you leave this argument blank, the default True is assumed. Remarks The following rules apply when you use the SendObject action to include a database object in a mail message: You can send table, query, and form datasheets.
In the included object, all fields in the datasheet look as they do in Access, except fields containing OLE objects.
The columns for these fields are included in the object, but the fields are blank. For a text box bound to a Hyperlink field, the output file displays the hyperlink for all output formats except MS-DOS text in this case, the hyperlink is just displayed as normal text. If you send a report, the only controls that are included in the object are text boxes for. All other controls are ignored. Header and footer information is also not included. The only exception to this is that when you send a report in Excel format, a text box in a group footer containing an expression with the Sum function is included in the object.
No other control in a header or footer and no aggregate function other than Sum is included in the object. When you send a datasheet or form in HTML format, one. When you send a report in HTML format, one. Example The following example includes the Employees table in a mail message in Microsoft Excel format and specifies To, Cc, and Subject lines in the mail message.
The email is sent immediately, without editing. This can be an issue because Windows security intercepts each MAPI message and prompts the user for confirmation.
SendObject The SendObject method is fairly limited in the types of emails you can send. If you need more sophisticated emails, learn about our Total Access Emailer program. Total Access Emailer is the most popular email program for Microsoft Access and lets you easily create personalized emails to everyone in your list using your Access data and reports.
DoCmd.SendObject and its File Attachment
MS Access – VBA – Rename attachment in SendObect Method