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.

AnchorO_17471O_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).

AnchorO_17472O_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 INTERVIEWwiki has been created for interviews that have been booked. See Maintaining lookup tables in the System maintenance manual.

AnchorO_17473O_17473 Image Removed
Image Added

To create mail merge letters using a stored procedure, such as the crspFutureActivityPrint procedure:

  1. Open Microsoft Word.
  2. Select:
  3. .
  4. Click the Mailings tab.
    The Mailings tab is displayed.
    Image Added
  5. Click Image Added.

    Mailings > Start Mail Merge (Microsoft Word 2010)
    • Tools > Letters and Mailings > Mail Merge (Microsoft Word 2003).

  6. Select Step-by-Step Mail Merge Wizard from the drop-down list.
    Image Added
    Step 1 of the Mail Merge tab is displayed on the document window.

...

  1. Image Added
  2. Select the document type of document you are working on.
  3. Click Next: Starting document.
    Step 2 of the Mail Merge tab is displayed on the document window.

...

  1. Image Added
  2. Select the starting document.
  3. Click Next: Select recipients.
    Step 3 of the Mail Merge tab is displayed on the document window.

...

  1. Image Added
  2. Click Browse.
    The Select Data Source window is displayed.

...

  1. Image Added
  2. Select Tools > MS Query.
    Image Added
    The Choose Data Source window is displayed.

...

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

...

  1. .

    Note: Entries prefixed with 'SynergyOne' are pre-Version 68 entries.

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

...

  1. Click Image Removed Image Added
  2. Click Image Added.
    The SQL Server Login window is displayed.

...

  1. Image Added
  2. Type in your username and password.

    Note: This is your usual Synergetic username and password.

  3. Click Image Removed Image Added.
    The Add Tables window is displayed.

...

  1. Click AnchorO_10556O_10556 Image Removed.Click AnchorO_17440O_17440 Image RemovedImage Added
  2. Click Image Added.
  3. Click Image Added.
    The SQL window is displayed.
    Image Added
  4. 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.

...

  1. Image Added
    Note: In this example we have omitted the campus parameter.
  2. Click Image Removed Image Added.
    The following dialog window may be displayed.

...

  1. Image Added
  2. Click Image Removed Image Added.
    The Microsoft Query window is displayed with the data returned by the stored procedure.

...

  1. Image Added
  2. Select File > Return Data to Microsoft Word.

    The Mail Merge Recipients window is displayed.

...

  1. Image Added

    Note:
    Ensure that you return this data as soon as possible, as the data from Microsoft Query is not available for longer than 15 minutes.
    Click AnchorO_10481O_10481 Image Removed 
  2. Click Image Added.
    Step 4 of the Mail Merge tab is displayed on the document window.

...

  1. Image Added
  2. Click More Items.
    The Insert Merge Field window is displayed.

...

  1. Image Added
  2. Locate and select the field to insert into the document.
  3. Click AnchorO_6615O_6615 Image RemovedImage Added.
    The field is inserted in the document.
  4. Repeat steps 22 and 23 until all of the required fields are added to the document.
  5. Close the Insert Merge Field window.
  6. Add other text and format the letter.

...

  1. Click AnchorO_17485O_17485 Image Removed Image Added
  2. Click Image Added to view the merged data.

...

  1. Image Added
  2. 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".

...

  1. Image Added

  2. Preview the output and merge the letters.
  3. Save the document.
    This document can form the basis of other similar letters based on future student activities.