View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Record count for merge records

It's pretty hard to get the count if you take into account everything the
user can do - e.g. if they make individual selections in the Mail Merge
Recipients dialog.

I think I would try to use Word's Mail Merge Events to generate table rows
on a record-by-record basis or possibly - if you can give the user a
suitable button - to do a complete "dummy run" and count the number of
records (perhaps you can then throw away the output document) before doing
the real merge.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Doug Banwell" wrote in message
oups.com...
I am doing Word mail merges from subsets of Access data and their sub-
records.
I merge multiple sub-records into a single document, but ....
I need to know the number of records in my current merge. (So I can
construct a table of the correct length).
Currently, I ask the user to enter the number of sub-records involved,
but I need to make it automatic.
I have had no luck with
ActiveDocument.MailMerge.DataSource.RecordCount because it returns the
number of records in my entire database table instead of the number of
records selected in the current merge.

Any suggestions or helpful hints would be greatly appreciated.

Thx,
Doug Banwell