成人快手

Mail merge and macros

Mail merge allows users to personalise letters with fields from a database.

Example of a mail merge dialogue box

The five main steps in setting up a mail-merged letter are:

  • Create a database with fields for the names and addresses of the people to send the letter to
  • Write the letter using a word processing package and link the letter to the database
  • Use a query to find a subset of relevant people and send a targeted letter to them
  • Using the mail merge wizard, enter codes in the letter where the name and address of the customers should appear
  • Merge-print, taking the data from the database and inserting it in the letters, producing one letter for each person in the subset of relevant people from the database

Advantages

  • The letter can be personalised 鈥 it looks as though the letter has been written to the individual person
  • It's a very fast way to produce hundreds of individual letters

Macros

A macro is a set of instructions within a program that carries out repeated tasks or procedures automatically.

Consider the following scenario: Every evening Vicki must check stock levels to see what has to be ordered from suppliers. Vicki has set a re-order level of 5 for all her products. This task can be time consuming.

Vicki decides to create a macro to automate the task with the following macro:

If [Forms]![Stock Form]![QtyInStock]<5 Then

    MessageBox
      Message  Please Reorder this item
      Beep     Yes
      Type     Information
      Title    Reorder Alert

This macro can then be added to the properties of the stock form. If the Quantity in stock is less than 5, Vicki will be alerted automatically.

Example of an automatic alert generated by a macro