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.
Create a new blank database. Call the database sickleave.accdb.
Create a new table in design view. Click on the Create tab and choose Table Design from the Tables chunk.
Add the following fields with the associated properties.
Set the Number field as the Primary Key.
Save the table as Employees. Click on the Save icon. Close the Employees table.
Create another table with the following fields and associated properties.
Save the table as Absences.
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.
Make sure that the data for both tables is accurate.
Close all open tables.
Create Relationships between tables
Open the Relationship Tool. Click on the Database Tools tab and select Relationships.
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.
Save and close the Relationships tool.
Create a grouped report
Create a new report using the report wizard. Click on the Create tab and from the Reports chunk select Report wizard.
From the Tables/queries dropdown list, select the Employees table and add all fields.
From the Tables/queries dropdown list, select the Absences table and add the following fields, StartDate, EndDate, and DaysTaken.
Click on Next.
View your data by Employee.
Click on next.
Group by Number. Select the number field and then click on the > button.
Click on next.
Sort in ascending order by StartDate. Click on next until you see finish.
Click on Finish.
Save the report. Leave the report open for the next step.
Make each employee appear on one page
Click on Close Print Preview. The report will open in Design view.
Select the Number header by clicking on it. Open the property sheet for this object. The object will be called GroupHeader0 or similar.
Select the Format tab, and change Force New Page to Before section.
Save the report and leave it open.
Export the report to Microsoft Word
Export the report to word. Click on the External data tab and then choose Word from the Exports chunk.
Follow the wizard prompts. Click on Ok.
Open the document in Microsoft word.
Save the RTF document as a docx
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.
Click File, and then Save as…
From the dialog box choose Word Document from the Save as type drop down list.