Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I would probably do the whole thing in Access. Alternatively, a
"roll-your-own" vba equivalent to mail merge. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "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 |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]() Would it be feasable to use a query - in Access on the table/query you are running the merge from - which is grouped and uses the Count function? Then you know how many records are going out even before you start the Mail merge.... Lara |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Resetting the record count | Mailmerge | |||
directory doesn't merge records w/o next record field | Mailmerge | |||
Next Record If, problems with merging multiple records | Mailmerge | |||
How do I keep merged records from printing only one record per pag | Mailmerge | |||
How to show the record count at the end of the merging document? | Mailmerge |