Mail Merge Sorting RRS feed

  • Question

  • I have a mail merge template and once the export is complete, the data is not sorted from lowest to highest. The records are listed as

    02.0 ABC

    02.1 XYZ

    02.2 MNO

    So tried the options given in the other forum questions (By using Edit Recipient List Under Mailing option in Microsoft word, Selected the Ascending order for the Field Area Name), but still no luck.

    Any help is appreciated.




    • Moved by Chenchen Li Wednesday, March 22, 2017 2:39 AM
    Tuesday, March 21, 2017 9:02 AM

All replies

  • Hello Prem,

    I would move this thread into Word IT Pro Discussions forum since the issue is not related to manipulate Word Object Model. Hope community members there could share valuable suggestions about how to work around the issue. Sorry for any inconvenience.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 22, 2017 2:39 AM
  • Hi Prem,

    Could you provide the detailed steps you followed to change the sort order? When I was testing this in my environment (Office 2016), I successfully sorted the records via the set order.

    We can click the column header (Name, Email or Value in following example) that you want to sort by directly when in the Edit Recipient List dialog:

    If I've misunderstood something, please feel free to let me know.


    Steve Fan

    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, March 23, 2017 8:47 AM
  • It's not clear from your post whether '02.0 ABC', for example, exists as one field or as two fields in your data source. Neverthless, using:
    Mailings>Edit Recipient List>Sort>Sort by (with the appropriate field name)>Ascending
    works for me.

    Paul Edstein
    [MS MVP - Word]

    Thursday, March 23, 2017 11:49 PM
  • Hi Steve Fan,

    I followed the same steps as you did, but the sort order doesn't work. Below is the final output that I get after exporting.


    Friday, March 24, 2017 4:05 PM
  • Hi Paul,

    It's just one field.




    Friday, March 24, 2017 4:05 PM
  • It's not easy to imagine a situation where the texts you listed would not sort correctly, but...

    What is the data source? e.g., a Word document, an Excel sheet, an Access Query, a SQL Server View?

    If it's an Access Query or a SQL Server View, can you provide the SQL query code or the view code? 

    [Ideally ,if you know how to use VBA, you could find out the query that Word is using to get the data by looking at the value of ActiveDocument.MailMerge.DataSource.QueryString]

    (I don't have a specific "known problem" in mind, but there are some possibilities - e.g., at one time in Access there used to be a limit to the number of characters you could sort on, and sometimes a column containing Memo data or UNION'ed with a column containing Memo data might not sort as you expect).

    Peter Jamieson

    • Proposed as answer by Steve Fan Wednesday, April 5, 2017 9:46 AM
    Sunday, March 26, 2017 6:49 PM