Using Mail Merge Features in Subject Line of an Email

I just learned to use mail merge in Word 2010, using data from an Excel 2010 spreadsheet, to send personalized emails from template through my Outlook 2010 account.  Mail Merge seems very useful, but perhaps the most important thing to personalize in a sales email is the subject line.  

Is there a way to insert custom information into a subject line using mail merge for office 2010?

As an example, I would like to have a subject like  "Does <<your company>> accept online payments?", but have mail merge replace "<<your company>>" with the company names contained in my spreadsheet.   

Is this possible? If not does anyone know of any free add-ons I can download to make this work?

Fellow MVP Graham Mayor's Mail Merge Add-in that you can download from


http://www.gmayor.com/ManyToOne.htm


does allow the inclusion of a merge field in the subject, but I believe that the field must be located either before or after the text in the subject, rather than being within the text as in your example.


I know that you will not be able to get access to the code in Graham's Add-in to modify it.


My  MergeTools – 20140111 Add-in that you can download from the following page of my Windows Live SkyDrive:

https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566


does not have the code in it protected so it would be possible to modify it to do what you want.


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

10 people found this reply helpful

·

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.

It was a bit quiet (and too hot to do anything outside) here today, so I have modified my add-in so that its Merge with Attachments facility gives you the option to select a field from the data source to be used in the subject and it has facilities to enter text to go before the content of the selected field and also after the selected field.



You can download the MergeTools – 20140111 Add-in that I created from the following page of my Windows Live SkyDrive:

https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566

Save the file 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, it is

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

When you have done that, the tab shown below will be added to the Ribbon:




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

You may also want to download 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 in the form of Word files or .pdf files.

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

2 people found this reply helpful

·

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.

Doug,

I love the "Merge With Attachments" feature of the add-in to customize the subject line, but the emails processed do not have the mapped fields merged. For example, it just says, "<<greeting line>> rather then the recipients name. I know you can create a salutation, but how do I insert custom fields anywhere in the body of the email?

How do I get around this?

Dave

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.

The facility cannot make use of the compound merge fields.  Using a formula in the datasource however, it would be possible to populate another field in the datasource with the same output as that created by the <<Greeting Line>> field and you could then use that field for the Salutation.

Another way to create\populate a field in the data source with the same data as output by the <<Greeting Line>> would be to use the data source with a Directory type mail merge main document in which you put the <<Greeting Line>> field inside the cell of a one row, one column table, with nothing else in that main document.  When you then execute that merge to a new document, that document will contain a table that contains a row with the output of the <<Greeting Line>> field for record in the data source.  You can then copy that table and paste it as a new column in the data source, giving it an appropriate field name.

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.

It was a bit quiet (and too hot to do anything outside) here today, so I have modified my add-in so that its Merge with Attachments facility gives you the option to select a field from the data source to be used in the subject and it has facilities to enter text to go before the content of the selected field and also after the selected field.



You can download the MergeTools – 20140111 Add-in that I created from the following page of my Windows Live SkyDrive:

https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566

Save the file 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, it is

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

When you have done that, the tab shown below will be added to the Ribbon:




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

You may also want to download 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 in the form of Word files or .pdf files.

Hi Doug,

Really appreciate your efforts in creating this macro. Bravo!!!

But I still have a hard luck. Every time I run it, it gives me an error " 9-Subscript out of range."

Could you please tell me am I doing something wrong? 

BTW, I am using Office 2016 with windows-10.

Thanks in advance,

Regards,

KAMAL

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.

9 – Subscript out of range errors can be caused by problems in the data source – usually field names containing other than alpha-numeric characters of starting with a numeral: having an empty row between the fieldnames and the first row of data.
In the case of a Merge with Charts, the data source does not contain Sheets with the name of Data and\or Chart.

If you cannot sort it out, send me a copy of the mail merge main document and the data source, referencing this thread in the covering email message, I will investigate the issue.


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

2 people found this reply helpful

·

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 found your post only now, I'm working on a customized MailMerge add in for a company and I downloaded your add in to have an help, but I found that the VBA code is protected by a password. Is it my error or you decided to not share your code anymore?

Thank you,

Chiara

4 people found this reply helpful

·

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 April 22, 2024 Views 57,192 Applies to: