Is there a way to sort the DB fields in Word's mailmerge field lists?

C

Clive

I have written an app for my customer that helps them create Word Template
documents, but they have a choice of 30 or so fields - which makes it
tedious to look through it to find the one they want. Is there any way to
sort that list? (Other than rewriting my query!)

Help much appreacited

Clive
 
P

Peter Jamieson

I don't think you can sort the content of the standard dropdowns. However, I
suppose you could always write your own dialog box that allowed them to pick
the field names, insert the appropriate MERGEFIELD field, and let them sort
in a variety of ways. Not really my thing, particularly because I don't
really like modifying the standard Word user interface.

Peter Jamieson
 
C

Clive

Thanks again Peter.

I'd rather not modify the Word UI either. In the end I may do it in SQL - getting the list of fields then sorting them, then programmatically writing a select statement (with sorted fields) - to select from the underlying select statement. Then Word's list will be naturally sorted.

Also thanks for pointing me to the MergeWithAttachments article. That has given a few ideas..

Regards

Clive
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top