Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2007

Tip: Looking for answers? Try searching our database.

Record count for merge records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doug Banwell - 25 Oct 2007 16:50 GMT
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
Peter Jamieson - 25 Oct 2007 18:13 GMT
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.

Signature

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

>I am doing Word mail merges from subsets of Access data and their sub-
> records.
[quoted text clipped - 12 lines]
> Thx,
> Doug Banwell
Doug Robbins - Word MVP - 25 Oct 2007 22:43 GMT
I would probably do the whole thing in Access.  Alternatively, a
"roll-your-own" vba equivalent to mail merge.

Signature

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

>I am doing Word mail merges from subsets of Access data and their sub-
> records.
[quoted text clipped - 12 lines]
> Thx,
> Doug Banwell
Lara - 31 Oct 2007 20:15 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.