Hi Atul,
> I am currently creating an application which allows users to choose a list
> of database fields and include them into a main mail merge document. Once
[quoted text clipped - 8 lines]
> main mail merge document.
>
From what I hear, this approach no longer works in more recent versions of
Word. Word requires at least one data record in order to provide a list of
field names for insertion into the document.
What I generally tend to do is use ADO (or whatever connection method is most
appropriate) to link to the data source, read the field names, then populate a
list of some sort. When the user selects a field name, code attached to the
control inserts a mergefield.
> My second question is: If my application extracts the merge data source into
> one large text file, can I use ADO to grab a subset of these records,
> perform a merge and then move onto the next subset (defined by differing
> criteria). I would like this approach as I do not want to read in the entire
> datasource, perform filtering and then merge, save and close the document.
> Then repeat the read, filter and merge. Is this possible?
Word's mail merge can work ONLY with a file saved to a "traditional" path (no
URL, only file paths). You shouldn't need to close the document between
changing the filter settings (QueryString property), if that helps at all...
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)