Table in Mail Merge

I am doing a mail merge from Excel 2007 to Word 2007. My Word doc has a table in it that looks like this:

                     Merge Field 1                 Merge Field 2                 Merge Field 3                  Merge Field 4

Program 1

Program 2

Program 3

Program 4

My Excel source is such that not every employee will have participated in every program, however, when they do participate in a program, every merge field will be filled in. For example, John Smith participated in Programs 1, 2, and 4. All four merge fields for these three programs will be filled in. I would like the merge to have a condition IF statements in it to say something to the effect of:

IF Merge Field 1 is blank (which will only happen if they did not participate in the program), then delete that row in my table.

So in the example, John Smith's table would only have 3 rows.

Is there a way to accomplish this without using VBA? Thanks for any and all help.

Fabio

Answer
Answer

Download the MergeTools – 20140218.dotm Add-in that I created from the following page of my One Drive:

http://bit.ly/1hduSCB


and use the Many To One facility that it includes.

The file needs to be saved in the Word Startup folder.  In Windows XP the default location for that folder is

C:\Documents and Settings\[User Name]\Application Data\Microsoft\Word\STARTUP

In Windows Vista and Windows 7, 8 or 8.1 it 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:


One thing to note is that the field names in the data source must contain only alphanumeric characters (No @,#,$,%,&,(,), etc) and the field names must not start with a numeric character (0-9).

Also download 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
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

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.

 
 

Question Info


Last updated October 5, 2021 Views 1,565 Applies to: