Automate sending a report snapshot in e-mail

Microsoft Office Access 2003

Show All Show All

Automate sending a report snapshot in e-mail

  1. Create a macro.

    ShowHow?

    1. In the Database window, click Macros Button image under Objects.
    2. Click the New button on the Database window toolbar.
    3. Add an action to the macro.

      ShowHow?

      1. In the Macro window, click the first empty row in the Action column. If you want to insert an action between two action rows, click the selector for the action row just below the row where you want to insert the new action, and then click Insert Row Button image on the toolbar.
      2. In the Action column, click the arrow to display the action list.
      3. Click the action you want to use.
      4. In the lower part of the window, specify arguments for the action, if any are required. For action arguments whose settings are a database object name, you can set the argument by dragging the object from the Database window to the action's Object Name argument box.
      5. Type a comment for the action. Comments are optional.
    4. To add more actions to the macro, move to another action row and repeat step 3. Microsoft Access carries out the actions in the order you list them.
  2. Add the SendObject action to the macro. For example:
    Argument Value
    Object Type Report
    Object Name Summary of Sales by Quarter
    Output Format Snapshot Format
    To All Northwind Traders; Shareholders
    Cc none
    Bcc none
    Subject Quarterly Sales report
    Message Text This is our best quarter in years!
    Edit Message No
  3. Run the macro each time you want to send the report snapshot.

    ShowHow?

    To run a macro directly, do one of the following:

    • To run a macro from the Macro window, click Run Button image on the toolbar.
    • To run a macro from the Database window, click Macros Button image and then double-click a macro name.
    • On the Tools menu, point to Macro, click Run Macro, and then select the macro from the Macro Name list. Then click a macro in the Macro Name box.