Well that is a significantly different situation from that mentioned i
your
original post.
To automate the execution of mail merge to email destinations, it is
necessary to supply the MailAddressFieldName
With ActiveDocument.MailMerge
.Destination = wdSendToEmail
.MailAddressFieldName =
[fieldfromdatasourcethatcontainstheemailaddresses]
etc.
Using the above type of construction, I don't think that it will b
possible
to use code to intercept each record to determine to what destinatio
it
should be merged.
For information on creating individual documents as part of the mai
merge
process, see the "Individual Merge Letters" item on fellow MVP Graha
Mayor's
website at:
http://www.gmayor.com/individual_merge_letters.htm
If you are using Word XP or later, the "Add-in to Merge Letters t
Separate
Files" that I have written and that can be downloaded from that sit
will
allow you to create each letter as a separate file with a filenam
taken
from a field in the data source with a minimum of fuss.
I believe that it should be possible to modify the code in that Add-i
so
that it can determine from each record the destination to which th
"merge"
should be executed and thus automate the whole process, Printing thos
that
are to be printed, email those that are to be emailed and creating
individual documents for those for which the destination is to be a ne
document.
--
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, originally posted via msnews.microsoft.co