Order by group
| | | | | |

How to create order by group in Microsoft Word

It is impossible to order by group using Mail Merge in Microsoft Word without programming. You can create the same effect by first making a report in Microsoft Access and then exporting the report to Microsoft Word.

Basic Technique

  1. Create Tables in Access.
  2. Create Relationships between tables.
  3. Create a grouped report.
  4. Make each employee appear on one page.
  5. Export the report to Microsoft Word (Rich Text Format).
  6. Save the RTF document as a docx.

Detailed Technique

Create Tables in Access

Field Name Data Type Field Size Caption
Number Text 6
FirstName Text 25 First Name
LastName Text 25 Surname
Department Text 50
Field Name Data Type Field Size Format Caption
Number Text 6
StartDate Date/Time Short Date Start Date
EndDate Date/Time End Date End Date
DaysTaken Number Days Taken
  1. Open Microsoft Access.
  2. Create a new blank database. Call the database sickleave.accdb.
  3. Create a new table in design view. Click on the Create tab and choose Table Design from the Tables chunk.
  4. Add the following fields with the associated properties.
  5. Set the Number field as the Primary Key.
  6. Save the table as Employees. Click on the Save icon. Close the Employees table.
  7. Create another table with the following fields and associated properties.
  8. Save the table as Absences.
  9. Add data to the table. You can copy and paste this from Excel or another database. It might be easier to import from excel into your tables.
  10. Make sure that the data for both tables is accurate.
  11. Close all open tables.

Create Relationships between tables

  1. Open the Relationship Tool. Click on the Database Tools tab and select Relationships.
  2. Create a One to many relationship between the Number fields of the Employees table and the Absences table. You will need to add the tables to the grid first. After adding the tables simply drag the number field in the Employee table to the number field in the Absences table.
  3. Save and close the Relationships tool.

Create a grouped report

  1. Create a new report using the report wizard. Click on the Create tab and from the Reports chunk select Report wizard.
  2. From the Tables/queries dropdown list, select the Employees table and add all fields.
  3. From the Tables/queries dropdown list, select the Absences table and add the following fields, StartDate, EndDate, and DaysTaken.
  4. Click on Next.
  5. View your data by Employee.
  6. Click on next.
  7. Group by Number. Select the number field and then click on the > button.
  8. Click on next.
  9. Sort in ascending order by StartDate. Click on next until you see finish.
  10. Click on Finish.
  11. Save the report. Leave the report open for the next step.

Make each employee appear on one page

  1. Click on Close Print Preview. The report will open in Design view.
  2. Select the Number header by clicking on it. Open the property sheet for this object. The object will be called GroupHeader0 or similar.
  3. Select the Format tab, and change Force New Page to Before section.
  4. Save the report and leave it open.

Export the report to Microsoft Word

  1. Export the report to word. Click on the External data tab and then choose Word from the Exports chunk.
  2. Follow the wizard prompts. Click on Ok.
  3. Open the document in Microsoft word.

Save the RTF document as a docx

  1. Access can only export word documents as Rich Text Format (RTF). You can save the resultant document in Microsoft Word document format from within Word.
  2. Click File, and then Save as…
  3. From the dialog box choose Word Document from the Save as type drop down list.

Similar Posts