Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Banwell Doug Banwell is offline
external usenet poster
 
Posts: 1
Default Record count for merge records

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   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


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Record count for merge records

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lara Lara is offline
external usenet poster
 
Posts: 8
Default Record count for merge records


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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resetting the record count btrossman Mailmerge 3 November 6th 06 06:18 AM
directory doesn't merge records w/o next record field VMHulme Mailmerge 4 August 31st 06 08:06 PM
Next Record If, problems with merging multiple records [email protected] Mailmerge 0 January 13th 06 04:38 PM
How do I keep merged records from printing only one record per pag BonnieB Mailmerge 4 November 13th 05 08:17 PM
How to show the record count at the end of the merging document? tcptang Mailmerge 0 February 21st 05 01:31 AM


All times are GMT +1. The time now is 06:35 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"