#1
|
|||
|
|||
Editing merged Word 2013 data before mail merging through Outlook
Trying to merge data for a bulk email from Access through Word into Outlook. Each email includes a table where each row lists a date from a merge field. Some tables are 1 row long and some tables are 70 rows long.
Client 1 MergeDate1 MergeDate2 Client 2 MergeDate1 MergeDate2 MergeDate3 MergeDate4 Client 1's table is 2 rows long, Client 2's table is 4 rows long. I have found macros that will strip the blank rows after the merge has been done, but I can't find a place to run that macro before it dumps into Outlook and starts sending. The only way I've found is to drop into preview mode and run the macro individually on *every one* of the 400+ emails before sending to Outlook - yuck. I was hoping to maybe do this back-to-front and have creating a new row in the table depend on whether or not the next field in the list is blank, but the various forums I've poked through seem to believe this is impossible. I know I'm probably making this much harder than it is, but I've got no formal training and just have to pick everything up as I go along. Many thanks from the Rookie! |
#2
|
||||
|
||||
If you can export the fields required (one row for each merge date) using the Client as a common key field to an Excel worksheet then you could use http://www.gmayor.com/ManyToOne.htm to merge to the table and then to the message body or to a Word or PDF attachment.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
You can also use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial:
https://www.msofficeforums.com/mail-...-tutorial.html The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it. The field coding for this is complex - the merge to email has yet another layer of complexity, involving the use of multiple documents and a macro. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An example of this approach can be found at: Many to one email merge using tables - Microsoft Community
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Update: I'm not allowed to download 3rd-party programs. Even if I managed to work my way around the firewall, on Friday night IT would restore my box to its original settings.
|
#5
|
||||
|
||||
None of the content in the links I posted is a 3rd-party program. The first two are to a tutorial document; the third is to a public discussion on how one might use Word's own DATABASE field (i.e. it's a function that already exists in Word [and has done so for decades]).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Yes, thank you. I was just putting that in as an update as other places I have been looking are all suggesting downloads - I meant it to be a general update & wasn't aware it went as a direct reply. Still looking through the info you posted.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA merging cells and counting Merged rows | Snaybot | Excel Programming | 2 | 11-09-2015 03:56 AM |
merging data sets in excel 2013 | nwiabrad | Excel | 9 | 07-24-2014 12:07 AM |
How would you go about mail merging this set of data | willsonfang | Mail Merge | 1 | 09-29-2013 07:16 PM |
Mail Merging more than 1 line of data ?? | Keith24249 | Mail Merge | 0 | 10-16-2009 06:36 AM |
Mail merging and pulling varying data from Excel | shannag1881 | Mail Merge | 0 | 10-05-2009 08:51 AM |