Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In the following example, letters are being prepared to mail to the parents of each future student who has an interview booked with the Head of Campus, using the crspFutureActivityPrint stored procedure.
An activity has been created on the Activity tab of Future Student Maintenance. See Future Student Maintenance - Activity tab in the Future students manual.

Anchor
O_17471
O_17471
Image Removed Image Added
In the example, the interview is booked with Sarah Adamski and her parents, as displayed on the:

  • Activity tab (selected above)
  • Modify Activity window (seen below).

Anchor
O_17472
O_17472
Image Removed Image Added
Activities are selected for the mail merge based on their Activity and the Mail Request field. However, if the Mailed Date and Mailed By fields are populated with values, this means that this activity has already has been printed.
The Activity field codes are maintained in the luActivity lookup table. In this example, INTBOOK has been created for interviews that have been booked. See Maintaining lookup tables in the System maintenance manual.
Anchor
O_17473
O_17473
Image Removed Image Added
To create mail merge letters using a stored procedure, such as the crspFutureActivityPrint procedure:

...

Step 1 of the Mail Merge tab is displayed on the document window.

Anchor
O_17474
O_17474
Image Removed Image Added

  1. Select the type of document you are working on.

...

Step 2 of the Mail Merge tab is displayed on the document window.

Anchor
O_17475
O_17475
Image Removed Image Added

  1. Select the starting document.
  2. Click Next: Select recipients.

Step 3 of the Mail Merge tab is displayed on the document window.

Anchor
O_17476
O_17476
Image Removed Image Added

  1. Click Browse.

The Select Data Source window is displayed.

Anchor
O_17477
O_17477
Image Removed Image Added

  1. Select Tools > MS Query.

The Choose Data Source window is displayed.

Anchor
O_14952
O_14952
Image Removed Image Added

  1. Select the Synergetic database you plan to use. That is:

...

  1. Clear the Use the Query Wizard to create/edit queries field.

Anchor
O_17462
O_17462
Image Removed Image Added

  1. Click Image Removed Image Added.

The SQL Server Login window is displayed.

Anchor
O_17444
O_17444
Image Removed Image Added

  1. Type in your username and password.

Note: This is your usual Synergetic username and password.

  1. Click Image Removed Image Added.

The Add Tables window is displayed.

Anchor
O_17445
O_17445
Image Removed Image Added

  1. Click
    Anchor
    O_10556
    O_10556
    Image Removed Image Added.


  1. Click
    Anchor
    O_17440
    O_17440
    Image Removed Image Added.

The SQL window is displayed.

  1. Type the stored procedure and its parameters. See Stored procedures (on page ) for details of each procedure. In this example, type:
  • exec
  • the procedure name, crspFutureActivityPrint
  • the first parameter, @Activity='<code>', where <code> is the activity code required
  • the second parameter, @Campus='<campus>', where <campus> is the campus required.

Anchor
O_17478
O_17478
Image Removed Image Added
Note: In this example we have omitted the campus parameter.

  1. Click Image Removed Image Added.

The following dialog window may be displayed.

Anchor
O_17479
O_17479
Image Removed Image Added

  1. Click Image Removed Image Added.

The Microsoft Query window is displayed with the data returned by the stored procedure.

Anchor
O_17480
O_17480
Image Removed Image Added

  1. Select File > Return Data to Microsoft Word.

...

  1. Click
    Anchor
    O_10481
    O_10481
    Image Removed Image Added.

Step 4 of the Mail Merge tab is displayed on the document window.

Anchor
O_17482
O_17482
Image Removed Image Added

  1. Click More Items.

The Insert Merge Field window is displayed.

Anchor
O_17483
O_17483
Image Removed Image Added

  1. Locate and select the field to insert into the document.
  2. Click
    Anchor
    O_6615
    O_6615
    Image Removed Image Added.

The field is inserted in the document.

  1. Repeat steps 22 and 23 until all of the required fields are added to the document.
  2. Close the Insert Merge Field window.
  3. Add other text and format the letter.

Anchor
O_17484
O_17484
Image Removed Image Added

  1. Click
    Anchor
    O_17485
    O_17485
    Image Removed Image Added to view the merged data.

Anchor
O_17486
O_17486
Image Removed Image Added

  1. Format any database fields, such as date fields with the time included.

Tip: Right click and select Toggle Field Codes, to format the date, such as @ "d/mm/yyyy".

Anchor
O_17487
O_17487
Image Removed Image Added

  1. Preview the output and merge the letters.
  2. Save the document.

...