Email Directory Mail Merge Code

I have an Access query as data source for mail merge from Word to Outlook. My data source like this:

Full_Name        Course       NPDD       CENDATE     LDTD     Email

John Doe          ART 001    1/1/2015   2/2/2015     3/3/2015 *** Email address is removed for privacy ***

John Doe          ART 002    1/1/2015   2/2/2015     3/3/2015 *** Email address is removed for privacy ***

Jane Doe          MGMT 001 1/1/2015  2/2/2015     3/3/2015 *** Email address is removed for privacy ***

Jane Doe          ACCT 001   1/1/2015  2/2/2015     3/3/2015 *** Email address is removed for privacy ***

I looked at and tried to figure out how to do it: https://support.microsoft.com/en-us/kb/294686 

Dear John Doe:

Below is your class, bla bla

Course       NPDD       CENDATE     LDTD    

ART 001    1/1/2015   2/2/2015     3/3/2015 

ART 002    1/1/2015   2/2/2015     3/3/2015

So John Doe would only receive one email with courses listed. Then, next email send to Jane Doe.

I opened Outlook, then Word and tried to Ctrl+F9 to insert fields in Word following above Microsoft example but could not do it. Can someone provide Word code? Thank you very much.



* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

You can 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 at:
http://windowssecrets.com/forums/showthread.php/154370-Microsoft-Word-Catalogue-Directory-Mailmerge-Tutorial
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
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.
 
Alternatively, you may want to try the Many-to-One Mail Merge add-in, from Doug Robbins at:
http://bit.ly/1hduSCB
 
In addition to a 'Many to One' merge, the latter handles:
• Merge with Charts
• Duplex Merge
• Merge with FormFields
• Merge to email with Attachments
• Merge to Individual Documents
• Merge, Print and Staple
Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you for quick reply. I tried those sites. I also tried to download that add in before I post the question. I follow those add-in instruction and cannot figure out how to get it to work. I've tried for 2 days already and cannot figure out. Can you provide Word field codes in my situation?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

A working sample set of Word field codes is included in my tutorial.

As for Doug's addin, he's given some installation instructions in this thread: http://answers.microsoft.com/en-us/office/forum/office_2013_release-word/email-merge-varying-amounts-of-information-in/e26aed84-4031-4546-b01f-ec3e4f407af9

Do note that you can't use the field codes from my tutorial with Doug's addin.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi, Paul:

Do you mean {chemical 1} etc code in your tutorial? I could not understand the code.

I put my file link Merge which has Access data source and Word email doc. Can you take a look?

Thanks.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Do you mean {chemical 1} etc code in your tutorial? I could not understand the code.

There is no "{chemical 1} etc code" in my tutorial to understand. You should download the tutorial (and read, specifically, the topic 'Merging by Catalog/Directory to E-Mail'), for which I provided links in my first post, not the entirely unrelated field codes in the other link.
Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I downloaded your tutorial 2 days ago and studied. Your EmailDataSource.doc is Word file and does not look like table. I use your Email Merge Main Document.doc with your EmailDataSource.doc, it looks fine. However Access table (the link I gave in my above message) is quite different from EmailDataSource.doc and I cannot figure it out.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

To create documents like that with data from an Access Database table or query, you can use the Many to One facility on my Merge Tools Add-in.

You can download the MergeTools – 20150422.dotm Add-in that I created from the following page of my One Drive: http://bit.ly/1hduSCB


The MergeTools – 20150422.dotm file needs to be saved in the Word Startup folder.  In Windows Vista and Windows 7, 8 or 8.1, the default location for that folder is

C:\Users\[User Name]\AppData\Roaming\Microsoft\Word\STARTUP

If you do not see the AppData folder: -

In Windows 7, - In Windows Explorer, click on the Organize drop down and then on Folder and search options and in the Folder Options dialog, go to the View tab and select the item "Show hidden files, folders, and drives".  While there, it is a good idea to uncheck the box of "Hide extensions for known file types".

In Windows 8 and 8.1, in the File Explorer, click on Options on the View tab of the ribbon and then on the View tab in the dialog that appears and select the item "Show hidden files, folders, and drives".  While there, it is a good idea to uncheck the box of "Hide extensions for known file types".

When that has been done and Word is started\re-started, the tab shown below will be added to the Ribbon:




The requirements for using the system are:

  1. The mail merge main document must be of the Letter type, though that does not mean that the output cannot be sent as an e-mail message. 

  2. For the Many To One, Merge with Attachments and Merge to Individual Docs utilities, the data source may be either a table or query in an Access database, or in the form of an Excel worksheet and that worksheet must be the first sheet in the Excel workbook. If the data is on some other sheet, you can easily move that sheet so that it is the first sheet in the workbook by clicking on the sheet tab and dragging it to the left.  For the Chart Merge utility, download the Mail Merging with Charts document that is also on that page of my OneDrive for additional requirements of the data source for use with that utility

  3. For a data source in the form of an Excel worksheet, the field names must be in the first row of the worksheet and there must be a field name in all of the cells in that row that are within the range of columns that contain the data.

  4. For both types of data source, the field names must contain only alphanumeric characters (No @,#,$,%,&,(,), etc) and the field names must not start with a numeric character (0-9). The number of characters in the field names, including spaces, must not be more than 40.

  5. For a data source in the form of an Excel worksheet, the data must start in the second row of the worksheet and there should be no empty rows within the range of data that is to be processed.

NOTE: The MergeTools applications cannot handle “Compound” MergeFields such as the «AddressBlock» or «GreetingLine».  Instead of using those fields, you will need to insert the individual merge fields.

You may also want to download:

  1. the Merging with Attachments document that is also on that page which explains how the system is used.  It is not actually necessary to have separate attachments as the facility can be used to send just the documents created by the merge itself as attachments, either as the body of the message itself or in the form of Word files or .pdf files.

  2. the Mail Merging with Charts document that is also on that page.  That document explains how you must set up the Excel Data Source and the Mail Merge Main document to be able to execute a merge with a Chart that is unique to each record in the data source.

  3. the Using the Many to One Facility document that describes how to use that facility.

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
Screen shots by Snagit from www.techsmith.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi, Doug:

I downloaded your add-in 2 days ago and installed and still cannot get it work for these 2 days. My first post is quite a simple Access query and email merge.  Can you help me check my file

https://www.dropbox.com/sh/6kuf1lyxl6ffmj1/AABSdRyLFggvt84mNHFx7T07a?dl=0

It is simple Access table but I cannot figure out how to add correct code in Word after Ctrl+F9

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I downloaded your tutorial 2 days ago and studied. Your EmailDataSource.doc is Word file and does not look like table. I use your Email Merge Main Document.doc with your EmailDataSource.doc, it looks fine. However Access table (the link I gave in my above message) is quite different from EmailDataSource.doc and I cannot figure it out.

Did you actually read the tutorial? Your reply suggests you didn't, despite my first post's advice:

Do read the tutorial before trying to use the mailmerge document included with it.

The documents the tutorial provides comes with instructions on how to use them. The fact they don't look like your Access table is immaterial - they don't look like an Excel workbook, either, but the same process works with Excel.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

In the following folder of my OneDrive

http://1drv.ms/1Ktiv9j

I have uploaded a modified version of your mail merge main document that I attached to your Access Database and then used the Many to One Facility on my Merge Tools Add-in to create the two PDF files that are also in the above folder.

No changes were made to the database so I did not bother uploading that.  You will however need to re-attached the datasource to the mail merge main document (as it will be in a different location on your machine), and then SAVE the mail merge main document before using the Many to One utility.

To produce the PDFs that I uploaded, the following selections were made in the Many to One interface

The other possible destinations for the merge are:

And, depending upon the Email destination selected, additional controls will appear as follows:

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
Screen shots by Snagit from www.techsmith.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated January 7, 2021 Views 1,796 Applies to: